1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 25 module soup.c.types; 26 27 public import gio.c.types; 28 public import glib.c.types; 29 public import gobject.c.types; 30 31 32 /** 33 * The supported address families. 34 */ 35 public enum SoupAddressFamily 36 { 37 /** 38 * an invalid %SoupAddress 39 */ 40 INVALID = -1, 41 /** 42 * an IPv4 address 43 */ 44 IPV4 = 2, 45 /** 46 * an IPv6 address 47 */ 48 IPV6 = 10, 49 } 50 alias SoupAddressFamily AddressFamily; 51 52 public enum SoupCacheResponse 53 { 54 FRESH = 0, 55 NEEDS_VALIDATION = 1, 56 STALE = 2, 57 } 58 alias SoupCacheResponse CacheResponse; 59 60 /** 61 * The type of cache; this affects what kinds of responses will be 62 * saved. 63 * 64 * Since: 2.34 65 */ 66 public enum SoupCacheType 67 { 68 /** 69 * a single-user cache 70 */ 71 SINGLE_USER = 0, 72 /** 73 * a shared cache 74 */ 75 SHARED = 1, 76 } 77 alias SoupCacheType CacheType; 78 79 public enum SoupCacheability 80 { 81 CACHEABLE = 1, 82 UNCACHEABLE = 2, 83 INVALIDATES = 4, 84 VALIDATES = 8, 85 } 86 alias SoupCacheability Cacheability; 87 88 public enum SoupConnectionState 89 { 90 NEW = 0, 91 CONNECTING = 1, 92 IDLE = 2, 93 IN_USE = 3, 94 REMOTE_DISCONNECTED = 4, 95 DISCONNECTED = 5, 96 } 97 alias SoupConnectionState ConnectionState; 98 99 /** 100 * The policy for accepting or rejecting cookies returned in 101 * responses. 102 * 103 * Since: 2.30 104 */ 105 public enum SoupCookieJarAcceptPolicy 106 { 107 /** 108 * accept all cookies unconditionally. 109 */ 110 ALWAYS = 0, 111 /** 112 * reject all cookies unconditionally. 113 */ 114 NEVER = 1, 115 /** 116 * accept all cookies set by 117 * the main document loaded in the application using libsoup. An 118 * example of the most common case, web browsers, would be: If 119 * http://www.example.com is the page loaded, accept all cookies set 120 * by example.com, but if a resource from http://www.third-party.com 121 * is loaded from that page reject any cookie that it could try to 122 * set. For libsoup to be able to tell apart first party cookies from 123 * the rest, the application must call soup_message_set_first_party() 124 * on each outgoing #SoupMessage, setting the #SoupURI of the main 125 * document. If no first party is set in a message when this policy is 126 * in effect, cookies will be assumed to be third party by default. 127 */ 128 NO_THIRD_PARTY = 2, 129 /** 130 * accept all cookies 131 * set by the main document loaded in the application using libsoup, and 132 * from domains that have previously set at least one cookie when loaded 133 * as the main document. An example of the most common case, web browsers, 134 * would be: if http://www.example.com is the page loaded, accept all 135 * cookies set by example.com, but if a resource from http://www.third-party.com 136 * is loaded from that page, reject any cookie that it could try to 137 * set unless it already has a cookie in the cookie jar. For libsoup to 138 * be able to tell apart first party cookies from the rest, the 139 * application must call soup_message_set_first_party() on each outgoing 140 * #SoupMessage, setting the #SoupURI of the main document. If no first 141 * party is set in a message when this policy is in effect, cookies will 142 * be assumed to be third party by default. Since 2.72. 143 */ 144 GRANDFATHERED_THIRD_PARTY = 3, 145 } 146 alias SoupCookieJarAcceptPolicy CookieJarAcceptPolicy; 147 148 /** 149 * Date formats that soup_date_to_string() can use. 150 * 151 * @SOUP_DATE_HTTP and @SOUP_DATE_COOKIE always coerce the time to 152 * UTC. @SOUP_DATE_ISO8601_XMLRPC uses the time as given, ignoring the 153 * offset completely. @SOUP_DATE_RFC2822 and the other ISO 8601 154 * variants use the local time, appending the offset information if 155 * available. 156 * 157 * This enum may be extended with more values in future releases. 158 */ 159 public enum SoupDateFormat 160 { 161 /** 162 * RFC 1123 format, used by the HTTP "Date" header. Eg 163 * "Sun, 06 Nov 1994 08:49:37 GMT" 164 */ 165 HTTP = 1, 166 /** 167 * The format for the "Expires" timestamp in the 168 * Netscape cookie specification. Eg, "Sun, 06-Nov-1994 08:49:37 GMT". 169 */ 170 COOKIE = 2, 171 /** 172 * RFC 2822 format, eg "Sun, 6 Nov 1994 09:49:37 -0100" 173 */ 174 RFC2822 = 3, 175 /** 176 * ISO 8601 date/time with no optional 177 * punctuation. Eg, "19941106T094937-0100". 178 */ 179 ISO8601_COMPACT = 4, 180 /** 181 * ISO 8601 date/time with all optional 182 * punctuation. Eg, "1994-11-06T09:49:37-01:00". 183 */ 184 ISO8601_FULL = 5, 185 /** 186 * An alias for @SOUP_DATE_ISO8601_FULL. 187 */ 188 ISO8601 = 5, 189 /** 190 * ISO 8601 date/time as used by XML-RPC. 191 * Eg, "19941106T09:49:37". 192 */ 193 ISO8601_XMLRPC = 6, 194 } 195 alias SoupDateFormat DateFormat; 196 197 /** 198 * How a message body is encoded for transport 199 */ 200 public enum SoupEncoding 201 { 202 /** 203 * unknown / error 204 */ 205 UNRECOGNIZED = 0, 206 /** 207 * no body is present (which is not the same as a 208 * 0-length body, and only occurs in certain places) 209 */ 210 NONE = 1, 211 /** 212 * Content-Length encoding 213 */ 214 CONTENT_LENGTH = 2, 215 /** 216 * Response body ends when the connection is closed 217 */ 218 EOF = 3, 219 /** 220 * chunked encoding (currently only supported 221 * for response) 222 */ 223 CHUNKED = 4, 224 /** 225 * multipart/byteranges (Reserved for future 226 * use: NOT CURRENTLY IMPLEMENTED) 227 */ 228 BYTERANGES = 5, 229 } 230 alias SoupEncoding Encoding; 231 232 /** 233 * Represents the parsed value of the "Expect" header. 234 */ 235 public enum SoupExpectation 236 { 237 /** 238 * any unrecognized expectation 239 */ 240 UNRECOGNIZED = 1, 241 /** 242 * "100-continue" 243 */ 244 CONTINUE = 2, 245 } 246 alias SoupExpectation Expectation; 247 248 /** 249 * Indicates the HTTP protocol version being used. 250 */ 251 public enum SoupHTTPVersion 252 { 253 /** 254 * HTTP 1.0 (RFC 1945) 255 */ 256 HTTP_1_0 = 0, 257 /** 258 * HTTP 1.1 (RFC 2616) 259 */ 260 HTTP_1_1 = 1, 261 } 262 alias SoupHTTPVersion HTTPVersion; 263 264 public enum SoupKnownStatusCode 265 { 266 NONE = 0, 267 CANCELLED = 1, 268 CANT_RESOLVE = 2, 269 CANT_RESOLVE_PROXY = 3, 270 CANT_CONNECT = 4, 271 CANT_CONNECT_PROXY = 5, 272 SSL_FAILED = 6, 273 IO_ERROR = 7, 274 MALFORMED = 8, 275 TRY_AGAIN = 9, 276 TOO_MANY_REDIRECTS = 10, 277 TLS_FAILED = 11, 278 CONTINUE = 100, 279 SWITCHING_PROTOCOLS = 101, 280 PROCESSING = 102, 281 OK = 200, 282 CREATED = 201, 283 ACCEPTED = 202, 284 NON_AUTHORITATIVE = 203, 285 NO_CONTENT = 204, 286 RESET_CONTENT = 205, 287 PARTIAL_CONTENT = 206, 288 MULTI_STATUS = 207, 289 MULTIPLE_CHOICES = 300, 290 MOVED_PERMANENTLY = 301, 291 FOUND = 302, 292 MOVED_TEMPORARILY = 302, 293 SEE_OTHER = 303, 294 NOT_MODIFIED = 304, 295 USE_PROXY = 305, 296 NOT_APPEARING_IN_THIS_PROTOCOL = 306, 297 TEMPORARY_REDIRECT = 307, 298 BAD_REQUEST = 400, 299 UNAUTHORIZED = 401, 300 PAYMENT_REQUIRED = 402, 301 FORBIDDEN = 403, 302 NOT_FOUND = 404, 303 METHOD_NOT_ALLOWED = 405, 304 NOT_ACCEPTABLE = 406, 305 PROXY_AUTHENTICATION_REQUIRED = 407, 306 PROXY_UNAUTHORIZED = 407, 307 REQUEST_TIMEOUT = 408, 308 CONFLICT = 409, 309 GONE = 410, 310 LENGTH_REQUIRED = 411, 311 PRECONDITION_FAILED = 412, 312 REQUEST_ENTITY_TOO_LARGE = 413, 313 REQUEST_URI_TOO_LONG = 414, 314 UNSUPPORTED_MEDIA_TYPE = 415, 315 REQUESTED_RANGE_NOT_SATISFIABLE = 416, 316 INVALID_RANGE = 416, 317 EXPECTATION_FAILED = 417, 318 UNPROCESSABLE_ENTITY = 422, 319 LOCKED = 423, 320 FAILED_DEPENDENCY = 424, 321 INTERNAL_SERVER_ERROR = 500, 322 NOT_IMPLEMENTED = 501, 323 BAD_GATEWAY = 502, 324 SERVICE_UNAVAILABLE = 503, 325 GATEWAY_TIMEOUT = 504, 326 HTTP_VERSION_NOT_SUPPORTED = 505, 327 INSUFFICIENT_STORAGE = 507, 328 NOT_EXTENDED = 510, 329 } 330 alias SoupKnownStatusCode KnownStatusCode; 331 332 /** 333 * Describes the level of logging output to provide. 334 */ 335 public enum SoupLoggerLogLevel 336 { 337 /** 338 * No logging 339 */ 340 NONE = 0, 341 /** 342 * Log the Request-Line or Status-Line and 343 * the Soup-Debug pseudo-headers 344 */ 345 MINIMAL = 1, 346 /** 347 * Log the full request/response headers 348 */ 349 HEADERS = 2, 350 /** 351 * Log the full headers and request/response 352 * bodies. 353 */ 354 BODY = 3, 355 } 356 alias SoupLoggerLogLevel LoggerLogLevel; 357 358 /** 359 * Describes how #SoupBuffer should use the data passed in by the 360 * caller. 361 * 362 * See also soup_buffer_new_with_owner(), which allows to you create a 363 * buffer containing data which is owned by another object. 364 */ 365 public enum SoupMemoryUse 366 { 367 /** 368 * The memory is statically allocated and 369 * constant; libsoup can use the passed-in buffer directly and not 370 * need to worry about it being modified or freed. 371 */ 372 STATIC = 0, 373 /** 374 * The caller has allocated the memory for the 375 * #SoupBuffer's use; libsoup will assume ownership of it and free it 376 * (with g_free()) when it is done with it. 377 */ 378 TAKE = 1, 379 /** 380 * The passed-in data belongs to the caller; the 381 * #SoupBuffer will copy it into new memory, leaving the caller free 382 * to reuse the original memory. 383 */ 384 COPY = 2, 385 /** 386 * The passed-in data belongs to the caller, 387 * but will remain valid for the lifetime of the #SoupBuffer. The 388 * difference between this and @SOUP_MEMORY_STATIC is that if you copy 389 * a @SOUP_MEMORY_TEMPORARY buffer, it will make a copy of the memory 390 * as well, rather than reusing the original memory. 391 */ 392 TEMPORARY = 3, 393 } 394 alias SoupMemoryUse MemoryUse; 395 396 /** 397 * Various flags that can be set on a #SoupMessage to alter its 398 * behavior. 399 */ 400 public enum SoupMessageFlags 401 { 402 /** 403 * The session should not follow redirect 404 * (3xx) responses received by this message. 405 */ 406 NO_REDIRECT = 2, 407 /** 408 * The caller will rebuild the request 409 * body if the message is restarted; see 410 * soup_message_body_set_accumulate() for more details. 411 */ 412 CAN_REBUILD = 4, 413 /** 414 * Deprecated: equivalent to calling 415 * soup_message_body_set_accumulate() on the incoming message body 416 * (ie, #SoupMessage:response_body for a client-side request), 417 * passing %FALSE. 418 */ 419 OVERWRITE_CHUNKS = 8, 420 /** 421 * Set by #SoupContentDecoder to 422 * indicate that it has removed the Content-Encoding on a message (and 423 * so headers such as Content-Length may no longer accurately describe 424 * the body). 425 */ 426 CONTENT_DECODED = 16, 427 /** 428 * if set after an https response 429 * has been received, indicates that the server's SSL certificate is 430 * trusted according to the session's CA. 431 */ 432 CERTIFICATE_TRUSTED = 32, 433 /** 434 * Requests that the message should be 435 * sent on a newly-created connection, not reusing an existing 436 * persistent connection. Note that messages with non-idempotent 437 * #SoupMessage:method<!-- -->s behave this way by default, unless 438 * #SOUP_MESSAGE_IDEMPOTENT is set. 439 */ 440 NEW_CONNECTION = 64, 441 /** 442 * The message is considered idempotent, 443 * regardless its #SoupMessage:method, and allows reuse of existing 444 * idle connections, instead of always requiring a new one, unless 445 * #SOUP_MESSAGE_NEW_CONNECTION is set. 446 */ 447 IDEMPOTENT = 128, 448 /** 449 * Request that a new connection is 450 * created for the message if there aren't idle connections available 451 * and it's not possible to create new connections due to any of the 452 * connection limits has been reached. If a dedicated connection is 453 * eventually created for this message, it will be dropped when the 454 * message finishes. Since 2.50 455 */ 456 IGNORE_CONNECTION_LIMITS = 256, 457 /** 458 * The #SoupAuthManager should not use 459 * the credentials cache for this message, neither to use cached credentials 460 * to automatically authenticate this message nor to cache the credentials 461 * after the message is successfully authenticated. This applies to both server 462 * and proxy authentication. Note that #SoupSession::authenticate signal will 463 * be emitted, if you want to disable authentication for a message use 464 * soup_message_disable_feature() passing #SOUP_TYPE_AUTH_MANAGER instead. Since 2.58 465 */ 466 DO_NOT_USE_AUTH_CACHE = 512, 467 } 468 alias SoupMessageFlags MessageFlags; 469 470 /** 471 * Value passed to soup_message_headers_new() to set certain default 472 * behaviors. 473 */ 474 public enum SoupMessageHeadersType 475 { 476 /** 477 * request headers 478 */ 479 REQUEST = 0, 480 /** 481 * response headers 482 */ 483 RESPONSE = 1, 484 /** 485 * multipart body part headers 486 */ 487 MULTIPART = 2, 488 } 489 alias SoupMessageHeadersType MessageHeadersType; 490 491 /** 492 * Priorities that can be set on a #SoupMessage to instruct the 493 * message queue to process it before any other message with lower 494 * priority. 495 */ 496 public enum SoupMessagePriority 497 { 498 /** 499 * The lowest priority, the messages 500 * with this priority will be the last ones to be attended. 501 */ 502 VERY_LOW = 0, 503 /** 504 * Use this for low priority messages, a 505 * #SoupMessage with the default priority will be processed first. 506 */ 507 LOW = 1, 508 /** 509 * The default priotity, this is the 510 * priority assigned to the #SoupMessage by default. 511 */ 512 NORMAL = 2, 513 /** 514 * High priority, a #SoupMessage with 515 * this priority will be processed before the ones with the default 516 * priority. 517 */ 518 HIGH = 3, 519 /** 520 * The highest priority, use this 521 * for very urgent #SoupMessage as they will be the first ones to be 522 * attended. 523 */ 524 VERY_HIGH = 4, 525 } 526 alias SoupMessagePriority MessagePriority; 527 528 /** 529 * A #SoupRequest error. 530 * 531 * Since: 2.42 532 */ 533 public enum SoupRequestError 534 { 535 /** 536 * the URI could not be parsed 537 */ 538 BAD_URI = 0, 539 /** 540 * the URI scheme is not 541 * supported by this #SoupSession 542 */ 543 UNSUPPORTED_URI_SCHEME = 1, 544 /** 545 * the server's response could not 546 * be parsed 547 */ 548 PARSING = 2, 549 /** 550 * the server's response was in an 551 * unsupported format 552 */ 553 ENCODING = 3, 554 } 555 alias SoupRequestError RequestError; 556 557 public enum SoupRequesterError 558 { 559 BAD_URI = 0, 560 UNSUPPORTED_URI_SCHEME = 1, 561 } 562 alias SoupRequesterError RequesterError; 563 564 public enum SoupSameSitePolicy 565 { 566 /** 567 * The cookie is exposed with both cross-site and same-site requests 568 */ 569 NONE = 0, 570 /** 571 * The cookie is withheld on cross-site requests but exposed on cross-site navigations 572 */ 573 LAX = 1, 574 /** 575 * The cookie is only exposed for same-site requests 576 */ 577 STRICT = 2, 578 } 579 alias SoupSameSitePolicy SameSitePolicy; 580 581 /** 582 * Options to pass to soup_server_listen(), etc. 583 * 584 * %SOUP_SERVER_LISTEN_IPV4_ONLY and %SOUP_SERVER_LISTEN_IPV6_ONLY 585 * only make sense with soup_server_listen_all() and 586 * soup_server_listen_local(), not plain soup_server_listen() (which 587 * simply listens on whatever kind of socket you give it). And you 588 * cannot specify both of them in a single call. 589 * 590 * Since: 2.48 591 */ 592 public enum SoupServerListenOptions 593 { 594 /** 595 * Listen for https connections rather 596 * than plain http. 597 */ 598 HTTPS = 1, 599 /** 600 * Only listen on IPv4 interfaces. 601 */ 602 IPV4_ONLY = 2, 603 /** 604 * Only listen on IPv6 interfaces. 605 */ 606 IPV6_ONLY = 4, 607 } 608 alias SoupServerListenOptions ServerListenOptions; 609 610 /** 611 * Return value from the #SoupSocket IO methods. 612 */ 613 public enum SoupSocketIOStatus 614 { 615 /** 616 * Success 617 */ 618 OK = 0, 619 /** 620 * Cannot read/write any more at this time 621 */ 622 WOULD_BLOCK = 1, 623 /** 624 * End of file 625 */ 626 EOF = 2, 627 /** 628 * Other error 629 */ 630 ERROR = 3, 631 } 632 alias SoupSocketIOStatus SocketIOStatus; 633 634 /** 635 * These represent the known HTTP status code values, plus various 636 * network and internal errors. 637 * 638 * Note that no libsoup functions take or return this type directly; 639 * any function that works with status codes will accept unrecognized 640 * status codes as well. 641 * 642 * Prior to 2.44 this type was called 643 * <literal>SoupKnownStatusCode</literal>, but the individual values 644 * have always had the names they have now. 645 */ 646 public enum SoupStatus 647 { 648 /** 649 * No status available. (Eg, the message has not 650 * been sent yet) 651 */ 652 NONE = 0, 653 /** 654 * Message was cancelled locally 655 */ 656 CANCELLED = 1, 657 /** 658 * Unable to resolve destination host name 659 */ 660 CANT_RESOLVE = 2, 661 /** 662 * Unable to resolve proxy host name 663 */ 664 CANT_RESOLVE_PROXY = 3, 665 /** 666 * Unable to connect to remote host 667 */ 668 CANT_CONNECT = 4, 669 /** 670 * Unable to connect to proxy 671 */ 672 CANT_CONNECT_PROXY = 5, 673 /** 674 * SSL/TLS negotiation failed 675 */ 676 SSL_FAILED = 6, 677 /** 678 * A network error occurred, or the other end 679 * closed the connection unexpectedly 680 */ 681 IO_ERROR = 7, 682 /** 683 * Malformed data (usually a programmer error) 684 */ 685 MALFORMED = 8, 686 /** 687 * Used internally 688 */ 689 TRY_AGAIN = 9, 690 /** 691 * There were too many redirections 692 */ 693 TOO_MANY_REDIRECTS = 10, 694 /** 695 * Used internally 696 */ 697 TLS_FAILED = 11, 698 /** 699 * 100 Continue (HTTP) 700 */ 701 CONTINUE = 100, 702 /** 703 * 101 Switching Protocols (HTTP) 704 */ 705 SWITCHING_PROTOCOLS = 101, 706 /** 707 * 102 Processing (WebDAV) 708 */ 709 PROCESSING = 102, 710 /** 711 * 200 Success (HTTP). Also used by many lower-level 712 * soup routines to indicate success. 713 */ 714 OK = 200, 715 /** 716 * 201 Created (HTTP) 717 */ 718 CREATED = 201, 719 /** 720 * 202 Accepted (HTTP) 721 */ 722 ACCEPTED = 202, 723 /** 724 * 203 Non-Authoritative Information 725 * (HTTP) 726 */ 727 NON_AUTHORITATIVE = 203, 728 /** 729 * 204 No Content (HTTP) 730 */ 731 NO_CONTENT = 204, 732 /** 733 * 205 Reset Content (HTTP) 734 */ 735 RESET_CONTENT = 205, 736 /** 737 * 206 Partial Content (HTTP) 738 */ 739 PARTIAL_CONTENT = 206, 740 /** 741 * 207 Multi-Status (WebDAV) 742 */ 743 MULTI_STATUS = 207, 744 /** 745 * 300 Multiple Choices (HTTP) 746 */ 747 MULTIPLE_CHOICES = 300, 748 /** 749 * 301 Moved Permanently (HTTP) 750 */ 751 MOVED_PERMANENTLY = 301, 752 /** 753 * 302 Found (HTTP) 754 */ 755 FOUND = 302, 756 /** 757 * 302 Moved Temporarily (old name, 758 * RFC 2068) 759 */ 760 MOVED_TEMPORARILY = 302, 761 /** 762 * 303 See Other (HTTP) 763 */ 764 SEE_OTHER = 303, 765 /** 766 * 304 Not Modified (HTTP) 767 */ 768 NOT_MODIFIED = 304, 769 /** 770 * 305 Use Proxy (HTTP) 771 */ 772 USE_PROXY = 305, 773 /** 774 * 306 [Unused] (HTTP) 775 */ 776 NOT_APPEARING_IN_THIS_PROTOCOL = 306, 777 /** 778 * 307 Temporary Redirect (HTTP) 779 */ 780 TEMPORARY_REDIRECT = 307, 781 PERMANENT_REDIRECT = 308, 782 /** 783 * 400 Bad Request (HTTP) 784 */ 785 BAD_REQUEST = 400, 786 /** 787 * 401 Unauthorized (HTTP) 788 */ 789 UNAUTHORIZED = 401, 790 /** 791 * 402 Payment Required (HTTP) 792 */ 793 PAYMENT_REQUIRED = 402, 794 /** 795 * 403 Forbidden (HTTP) 796 */ 797 FORBIDDEN = 403, 798 /** 799 * 404 Not Found (HTTP) 800 */ 801 NOT_FOUND = 404, 802 /** 803 * 405 Method Not Allowed (HTTP) 804 */ 805 METHOD_NOT_ALLOWED = 405, 806 /** 807 * 406 Not Acceptable (HTTP) 808 */ 809 NOT_ACCEPTABLE = 406, 810 /** 811 * 407 Proxy Authentication 812 * Required (HTTP) 813 */ 814 PROXY_AUTHENTICATION_REQUIRED = 407, 815 /** 816 * shorter alias for 817 * %SOUP_STATUS_PROXY_AUTHENTICATION_REQUIRED 818 */ 819 PROXY_UNAUTHORIZED = 407, 820 /** 821 * 408 Request Timeout (HTTP) 822 */ 823 REQUEST_TIMEOUT = 408, 824 /** 825 * 409 Conflict (HTTP) 826 */ 827 CONFLICT = 409, 828 /** 829 * 410 Gone (HTTP) 830 */ 831 GONE = 410, 832 /** 833 * 411 Length Required (HTTP) 834 */ 835 LENGTH_REQUIRED = 411, 836 /** 837 * 412 Precondition Failed (HTTP) 838 */ 839 PRECONDITION_FAILED = 412, 840 /** 841 * 413 Request Entity Too Large 842 * (HTTP) 843 */ 844 REQUEST_ENTITY_TOO_LARGE = 413, 845 /** 846 * 414 Request-URI Too Long (HTTP) 847 */ 848 REQUEST_URI_TOO_LONG = 414, 849 /** 850 * 415 Unsupported Media Type 851 * (HTTP) 852 */ 853 UNSUPPORTED_MEDIA_TYPE = 415, 854 /** 855 * 416 Requested Range 856 * Not Satisfiable (HTTP) 857 */ 858 REQUESTED_RANGE_NOT_SATISFIABLE = 416, 859 /** 860 * shorter alias for 861 * %SOUP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE 862 */ 863 INVALID_RANGE = 416, 864 /** 865 * 417 Expectation Failed (HTTP) 866 */ 867 EXPECTATION_FAILED = 417, 868 /** 869 * 422 Unprocessable Entity 870 * (WebDAV) 871 */ 872 UNPROCESSABLE_ENTITY = 422, 873 /** 874 * 423 Locked (WebDAV) 875 */ 876 LOCKED = 423, 877 /** 878 * 424 Failed Dependency (WebDAV) 879 */ 880 FAILED_DEPENDENCY = 424, 881 /** 882 * 500 Internal Server Error 883 * (HTTP) 884 */ 885 INTERNAL_SERVER_ERROR = 500, 886 /** 887 * 501 Not Implemented (HTTP) 888 */ 889 NOT_IMPLEMENTED = 501, 890 /** 891 * 502 Bad Gateway (HTTP) 892 */ 893 BAD_GATEWAY = 502, 894 /** 895 * 503 Service Unavailable (HTTP) 896 */ 897 SERVICE_UNAVAILABLE = 503, 898 /** 899 * 504 Gateway Timeout (HTTP) 900 */ 901 GATEWAY_TIMEOUT = 504, 902 /** 903 * 505 HTTP Version Not 904 * Supported (HTTP) 905 */ 906 HTTP_VERSION_NOT_SUPPORTED = 505, 907 /** 908 * 507 Insufficient Storage 909 * (WebDAV) 910 */ 911 INSUFFICIENT_STORAGE = 507, 912 /** 913 * 510 Not Extended (RFC 2774) 914 */ 915 NOT_EXTENDED = 510, 916 } 917 alias SoupStatus Status; 918 919 /** 920 * Error codes for %SOUP_TLD_ERROR. 921 * 922 * Since: 2.40 923 */ 924 public enum SoupTLDError 925 { 926 /** 927 * A hostname was syntactically 928 * invalid. 929 */ 930 INVALID_HOSTNAME = 0, 931 /** 932 * The passed-in "hostname" was 933 * actually an IP address (and thus has no base domain or 934 * public suffix). 935 */ 936 IS_IP_ADDRESS = 1, 937 /** 938 * The passed-in hostname 939 * did not have enough components. Eg, calling 940 * soup_tld_get_base_domain() on <literal>"co.uk"</literal>. 941 */ 942 NOT_ENOUGH_DOMAINS = 2, 943 /** 944 * The passed-in hostname has 945 * no recognized public suffix. 946 */ 947 NO_BASE_DOMAIN = 3, 948 NO_PSL_DATA = 4, 949 } 950 alias SoupTLDError TLDError; 951 952 /** 953 * Pre-defined close codes that can be passed to 954 * soup_websocket_connection_close() or received from 955 * soup_websocket_connection_get_close_code(). (However, other codes 956 * are also allowed.) 957 * 958 * Since: 2.50 959 */ 960 public enum SoupWebsocketCloseCode 961 { 962 /** 963 * a normal, non-error close 964 */ 965 NORMAL = 1000, 966 /** 967 * the client/server is going away 968 */ 969 GOING_AWAY = 1001, 970 /** 971 * a protocol error occurred 972 */ 973 PROTOCOL_ERROR = 1002, 974 /** 975 * the endpoint received data 976 * of a type that it does not support. 977 */ 978 UNSUPPORTED_DATA = 1003, 979 /** 980 * reserved value indicating that 981 * no close code was present; must not be sent. 982 */ 983 NO_STATUS = 1005, 984 /** 985 * reserved value indicating that 986 * the connection was closed abnormally; must not be sent. 987 */ 988 ABNORMAL = 1006, 989 /** 990 * the endpoint received data that 991 * was invalid (eg, non-UTF-8 data in a text message). 992 */ 993 BAD_DATA = 1007, 994 /** 995 * generic error code 996 * indicating some sort of policy violation. 997 */ 998 POLICY_VIOLATION = 1008, 999 /** 1000 * the endpoint received a message 1001 * that is too big to process. 1002 */ 1003 TOO_BIG = 1009, 1004 /** 1005 * the client is closing the 1006 * connection because the server failed to negotiate a required 1007 * extension. 1008 */ 1009 NO_EXTENSION = 1010, 1010 /** 1011 * the server is closing the 1012 * connection because it was unable to fulfill the request. 1013 */ 1014 SERVER_ERROR = 1011, 1015 /** 1016 * reserved value indicating that 1017 * the TLS handshake failed; must not be sent. 1018 */ 1019 TLS_HANDSHAKE = 1015, 1020 } 1021 alias SoupWebsocketCloseCode WebsocketCloseCode; 1022 1023 /** 1024 * The type of a #SoupWebsocketConnection. 1025 * 1026 * Since: 2.50 1027 */ 1028 public enum SoupWebsocketConnectionType 1029 { 1030 /** 1031 * unknown/invalid connection 1032 */ 1033 UNKNOWN = 0, 1034 /** 1035 * a client-side connection 1036 */ 1037 CLIENT = 1, 1038 /** 1039 * a server-side connection 1040 */ 1041 SERVER = 2, 1042 } 1043 alias SoupWebsocketConnectionType WebsocketConnectionType; 1044 1045 /** 1046 * The type of data contained in a #SoupWebsocketConnection::message 1047 * signal. 1048 * 1049 * Since: 2.50 1050 */ 1051 public enum SoupWebsocketDataType 1052 { 1053 /** 1054 * UTF-8 text 1055 */ 1056 TEXT = 1, 1057 /** 1058 * binary data 1059 */ 1060 BINARY = 2, 1061 } 1062 alias SoupWebsocketDataType WebsocketDataType; 1063 1064 /** 1065 * WebSocket-related errors. 1066 * 1067 * Since: 2.50 1068 */ 1069 public enum SoupWebsocketError 1070 { 1071 /** 1072 * a generic error 1073 */ 1074 FAILED = 0, 1075 /** 1076 * attempted to handshake with a 1077 * server that does not appear to understand WebSockets. 1078 */ 1079 NOT_WEBSOCKET = 1, 1080 /** 1081 * the WebSocket handshake failed 1082 * because some detail was invalid (eg, incorrect accept key). 1083 */ 1084 BAD_HANDSHAKE = 2, 1085 /** 1086 * the WebSocket handshake failed 1087 * because the "Origin" header was not an allowed value. 1088 */ 1089 BAD_ORIGIN = 3, 1090 } 1091 alias SoupWebsocketError WebsocketError; 1092 1093 /** 1094 * The state of the WebSocket connection. 1095 * 1096 * Since: 2.50 1097 */ 1098 public enum SoupWebsocketState 1099 { 1100 /** 1101 * the connection is ready to send messages 1102 */ 1103 OPEN = 1, 1104 /** 1105 * the connection is in the process of 1106 * closing down; messages may be received, but not sent 1107 */ 1108 CLOSING = 2, 1109 /** 1110 * the connection is completely closed down 1111 */ 1112 CLOSED = 3, 1113 } 1114 alias SoupWebsocketState WebsocketState; 1115 1116 public enum SoupXMLRPCError 1117 { 1118 ARGUMENTS = 0, 1119 RETVAL = 1, 1120 } 1121 alias SoupXMLRPCError XMLRPCError; 1122 1123 /** 1124 * Pre-defined XML-RPC fault codes from <ulink 1125 * url="http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php">http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php</ulink>. 1126 * These are an extension, not part of the XML-RPC spec; you can't 1127 * assume servers will use them. 1128 */ 1129 public enum SoupXMLRPCFault 1130 { 1131 /** 1132 * request was not 1133 * well-formed 1134 */ 1135 PARSE_ERROR_NOT_WELL_FORMED = -32700, 1136 /** 1137 * request was in 1138 * an unsupported encoding 1139 */ 1140 PARSE_ERROR_UNSUPPORTED_ENCODING = -32701, 1141 /** 1142 * request contained an invalid character 1143 */ 1144 PARSE_ERROR_INVALID_CHARACTER_FOR_ENCODING = -32702, 1145 /** 1146 * request was not 1147 * valid XML-RPC 1148 */ 1149 SERVER_ERROR_INVALID_XML_RPC = -32600, 1150 /** 1151 * method 1152 * not found 1153 */ 1154 SERVER_ERROR_REQUESTED_METHOD_NOT_FOUND = -32601, 1155 /** 1156 * invalid 1157 * parameters 1158 */ 1159 SERVER_ERROR_INVALID_METHOD_PARAMETERS = -32602, 1160 /** 1161 * internal 1162 * error 1163 */ 1164 SERVER_ERROR_INTERNAL_XML_RPC_ERROR = -32603, 1165 /** 1166 * start of reserved range for 1167 * application error codes 1168 */ 1169 APPLICATION_ERROR = -32500, 1170 /** 1171 * start of reserved range for 1172 * system error codes 1173 */ 1174 SYSTEM_ERROR = -32400, 1175 /** 1176 * start of reserved range for 1177 * transport error codes 1178 */ 1179 TRANSPORT_ERROR = -32300, 1180 } 1181 alias SoupXMLRPCFault XMLRPCFault; 1182 1183 struct SoupAddress 1184 { 1185 GObject parent; 1186 } 1187 1188 struct SoupAddressClass 1189 { 1190 GObjectClass parentClass; 1191 /** */ 1192 extern(C) void function() LibsoupReserved1; 1193 /** */ 1194 extern(C) void function() LibsoupReserved2; 1195 /** */ 1196 extern(C) void function() LibsoupReserved3; 1197 /** */ 1198 extern(C) void function() LibsoupReserved4; 1199 } 1200 1201 struct SoupAuth 1202 { 1203 GObject parent; 1204 char* realm; 1205 } 1206 1207 struct SoupAuthBasic; 1208 1209 struct SoupAuthClass 1210 { 1211 GObjectClass parentClass; 1212 const(char)* schemeName; 1213 uint strength; 1214 /** 1215 * 1216 * Params: 1217 * auth = a #SoupAuth 1218 * msg = the #SoupMessage @auth is being updated for 1219 * authHeader = the WWW-Authenticate/Proxy-Authenticate header 1220 * Returns: %TRUE if @auth is still a valid (but potentially 1221 * unauthenticated) #SoupAuth. %FALSE if something about @auth_params 1222 * could not be parsed or incorporated into @auth at all. 1223 */ 1224 extern(C) int function(SoupAuth* auth, SoupMessage* msg, GHashTable* authHeader) update; 1225 /** 1226 * 1227 * Params: 1228 * auth = a #SoupAuth 1229 * sourceUri = the URI of the request that @auth was generated in 1230 * response to. 1231 * Returns: the list of 1232 * paths, which can be freed with soup_auth_free_protection_space(). 1233 */ 1234 extern(C) GSList* function(SoupAuth* auth, SoupURI* sourceUri) getProtectionSpace; 1235 /** */ 1236 extern(C) void function(SoupAuth* auth, const(char)* username, const(char)* password) authenticate; 1237 /** 1238 * 1239 * Params: 1240 * auth = a #SoupAuth 1241 * Returns: %TRUE if @auth has been given a username and password 1242 */ 1243 extern(C) int function(SoupAuth* auth) isAuthenticated; 1244 /** 1245 * 1246 * Params: 1247 * auth = a #SoupAuth 1248 * msg = the #SoupMessage to be authorized 1249 * Returns: the "Authorization" header, which must be freed. 1250 */ 1251 extern(C) char* function(SoupAuth* auth, SoupMessage* msg) getAuthorization; 1252 /** 1253 * 1254 * Params: 1255 * auth = a #SoupAuth 1256 * msg = a #SoupMessage 1257 * Returns: %TRUE if @auth is ready to make a request with. 1258 */ 1259 extern(C) int function(SoupAuth* auth, SoupMessage* msg) isReady; 1260 /** 1261 * 1262 * Params: 1263 * auth = a #SoupAuth 1264 * Returns: %TRUE if @auth is able to accept credentials. 1265 */ 1266 extern(C) int function(SoupAuth* auth) canAuthenticate; 1267 /** */ 1268 extern(C) void function() LibsoupReserved3; 1269 /** */ 1270 extern(C) void function() LibsoupReserved4; 1271 } 1272 1273 struct SoupAuthDigest; 1274 1275 struct SoupAuthDomain 1276 { 1277 GObject parent; 1278 } 1279 1280 struct SoupAuthDomainBasic 1281 { 1282 SoupAuthDomain parent; 1283 } 1284 1285 struct SoupAuthDomainBasicClass 1286 { 1287 SoupAuthDomainClass parentClass; 1288 /** */ 1289 extern(C) void function() LibsoupReserved1; 1290 /** */ 1291 extern(C) void function() LibsoupReserved2; 1292 /** */ 1293 extern(C) void function() LibsoupReserved3; 1294 /** */ 1295 extern(C) void function() LibsoupReserved4; 1296 } 1297 1298 struct SoupAuthDomainClass 1299 { 1300 GObjectClass parentClass; 1301 /** */ 1302 extern(C) char* function(SoupAuthDomain* domain, SoupMessage* msg, const(char)* header) accepts; 1303 /** */ 1304 extern(C) char* function(SoupAuthDomain* domain, SoupMessage* msg) challenge; 1305 /** 1306 * 1307 * Params: 1308 * domain = a #SoupAuthDomain 1309 * msg = a #SoupMessage 1310 * username = a username 1311 * password = a password 1312 * Returns: whether or not the message is authenticated 1313 */ 1314 extern(C) int function(SoupAuthDomain* domain, SoupMessage* msg, const(char)* username, const(char)* password) checkPassword; 1315 /** */ 1316 extern(C) void function() LibsoupReserved2; 1317 /** */ 1318 extern(C) void function() LibsoupReserved3; 1319 /** */ 1320 extern(C) void function() LibsoupReserved4; 1321 } 1322 1323 struct SoupAuthDomainDigest 1324 { 1325 SoupAuthDomain parent; 1326 } 1327 1328 struct SoupAuthDomainDigestClass 1329 { 1330 SoupAuthDomainClass parentClass; 1331 /** */ 1332 extern(C) void function() LibsoupReserved1; 1333 /** */ 1334 extern(C) void function() LibsoupReserved2; 1335 /** */ 1336 extern(C) void function() LibsoupReserved3; 1337 /** */ 1338 extern(C) void function() LibsoupReserved4; 1339 } 1340 1341 struct SoupAuthManager 1342 { 1343 GObject parent; 1344 SoupAuthManagerPrivate* priv; 1345 } 1346 1347 struct SoupAuthManagerClass 1348 { 1349 GObjectClass parentClass; 1350 /** */ 1351 extern(C) void function(SoupAuthManager* manager, SoupMessage* msg, SoupAuth* auth, int retrying) authenticate; 1352 } 1353 1354 struct SoupAuthManagerPrivate; 1355 1356 struct SoupAuthNTLM; 1357 1358 struct SoupAuthNegotiate; 1359 1360 struct SoupBuffer 1361 { 1362 /** 1363 * the data 1364 */ 1365 void* data; 1366 /** 1367 * length of @data 1368 */ 1369 size_t length; 1370 } 1371 1372 struct SoupCache 1373 { 1374 GObject parentInstance; 1375 SoupCachePrivate* priv; 1376 } 1377 1378 struct SoupCacheClass 1379 { 1380 GObjectClass parentClass; 1381 /** */ 1382 extern(C) SoupCacheability function(SoupCache* cache, SoupMessage* msg) getCacheability; 1383 /** */ 1384 extern(C) void function() LibsoupReserved1; 1385 /** */ 1386 extern(C) void function() LibsoupReserved2; 1387 /** */ 1388 extern(C) void function() LibsoupReserved3; 1389 } 1390 1391 struct SoupCachePrivate; 1392 1393 struct SoupClientContext; 1394 1395 struct SoupConnection; 1396 1397 struct SoupContentDecoder 1398 { 1399 GObject parent; 1400 SoupContentDecoderPrivate* priv; 1401 } 1402 1403 struct SoupContentDecoderClass 1404 { 1405 GObjectClass parentClass; 1406 /** */ 1407 extern(C) void function() LibsoupReserved1; 1408 /** */ 1409 extern(C) void function() LibsoupReserved2; 1410 /** */ 1411 extern(C) void function() LibsoupReserved3; 1412 /** */ 1413 extern(C) void function() LibsoupReserved4; 1414 /** */ 1415 extern(C) void function() LibsoupReserved5; 1416 } 1417 1418 struct SoupContentDecoderPrivate; 1419 1420 struct SoupContentSniffer 1421 { 1422 GObject parent; 1423 SoupContentSnifferPrivate* priv; 1424 } 1425 1426 struct SoupContentSnifferClass 1427 { 1428 GObjectClass parentClass; 1429 /** 1430 * 1431 * Params: 1432 * sniffer = a #SoupContentSniffer 1433 * msg = the message to sniff 1434 * buffer = a buffer containing the start of @msg's response body 1435 * params = return 1436 * location for Content-Type parameters (eg, "charset"), or %NULL 1437 * Returns: the sniffed Content-Type of @buffer; this will never be %NULL, 1438 * but may be "application/octet-stream". 1439 */ 1440 extern(C) char* function(SoupContentSniffer* sniffer, SoupMessage* msg, SoupBuffer* buffer, GHashTable** params) sniff; 1441 /** 1442 * 1443 * Params: 1444 * sniffer = a #SoupContentSniffer 1445 * Returns: the number of bytes to sniff 1446 */ 1447 extern(C) size_t function(SoupContentSniffer* sniffer) getBufferSize; 1448 /** */ 1449 extern(C) void function() LibsoupReserved1; 1450 /** */ 1451 extern(C) void function() LibsoupReserved2; 1452 /** */ 1453 extern(C) void function() LibsoupReserved3; 1454 /** */ 1455 extern(C) void function() LibsoupReserved4; 1456 /** */ 1457 extern(C) void function() LibsoupReserved5; 1458 } 1459 1460 struct SoupContentSnifferPrivate; 1461 1462 struct SoupCookie 1463 { 1464 /** 1465 * the cookie name 1466 */ 1467 char* name; 1468 /** 1469 * the cookie value 1470 */ 1471 char* value; 1472 /** 1473 * the "domain" attribute, or else the hostname that the 1474 * cookie came from. 1475 */ 1476 char* domain; 1477 /** 1478 * the "path" attribute, or %NULL 1479 */ 1480 char* path; 1481 /** 1482 * the cookie expiration time, or %NULL for a session cookie 1483 */ 1484 SoupDate* expires; 1485 /** 1486 * %TRUE if the cookie should only be tranferred over SSL 1487 */ 1488 bool secure; 1489 /** 1490 * %TRUE if the cookie should not be exposed to scripts 1491 */ 1492 bool httpOnly; 1493 } 1494 1495 struct SoupCookieJar 1496 { 1497 GObject parent; 1498 } 1499 1500 struct SoupCookieJarClass 1501 { 1502 GObjectClass parentClass; 1503 /** */ 1504 extern(C) void function(SoupCookieJar* jar) save; 1505 /** 1506 * 1507 * Params: 1508 * jar = a #SoupCookieJar 1509 * Returns: %TRUE if @jar storage is persistent or %FALSE otherwise. 1510 */ 1511 extern(C) int function(SoupCookieJar* jar) isPersistent; 1512 /** */ 1513 extern(C) void function(SoupCookieJar* jar, SoupCookie* oldCookie, SoupCookie* newCookie) changed; 1514 /** */ 1515 extern(C) void function() LibsoupReserved1; 1516 /** */ 1517 extern(C) void function() LibsoupReserved2; 1518 } 1519 1520 struct SoupCookieJarDB 1521 { 1522 SoupCookieJar parent; 1523 } 1524 1525 struct SoupCookieJarDBClass 1526 { 1527 SoupCookieJarClass parentClass; 1528 /** */ 1529 extern(C) void function() LibsoupReserved1; 1530 /** */ 1531 extern(C) void function() LibsoupReserved2; 1532 /** */ 1533 extern(C) void function() LibsoupReserved3; 1534 /** */ 1535 extern(C) void function() LibsoupReserved4; 1536 } 1537 1538 struct SoupCookieJarText 1539 { 1540 SoupCookieJar parent; 1541 } 1542 1543 struct SoupCookieJarTextClass 1544 { 1545 SoupCookieJarClass parentClass; 1546 /** */ 1547 extern(C) void function() LibsoupReserved1; 1548 /** */ 1549 extern(C) void function() LibsoupReserved2; 1550 /** */ 1551 extern(C) void function() LibsoupReserved3; 1552 /** */ 1553 extern(C) void function() LibsoupReserved4; 1554 } 1555 1556 struct SoupDate 1557 { 1558 /** 1559 * the year, 1 to 9999 1560 */ 1561 int year; 1562 /** 1563 * the month, 1 to 12 1564 */ 1565 int month; 1566 /** 1567 * day of the month, 1 to 31 1568 */ 1569 int day; 1570 /** 1571 * hour of the day, 0 to 23 1572 */ 1573 int hour; 1574 /** 1575 * minute, 0 to 59 1576 */ 1577 int minute; 1578 /** 1579 * second, 0 to 59 (or up to 61 in the case of leap seconds) 1580 */ 1581 int second; 1582 /** 1583 * %TRUE if the date is in UTC 1584 */ 1585 bool utc; 1586 /** 1587 * offset from UTC 1588 */ 1589 int offset; 1590 } 1591 1592 struct SoupHSTSEnforcer 1593 { 1594 GObject parent; 1595 SoupHSTSEnforcerPrivate* priv; 1596 } 1597 1598 struct SoupHSTSEnforcerClass 1599 { 1600 /** 1601 * The parent class. 1602 */ 1603 GObjectClass parentClass; 1604 /** 1605 * 1606 * Params: 1607 * hstsEnforcer = a #SoupHSTSEnforcer 1608 * Returns: %TRUE if @hsts_enforcer storage is persistent or %FALSE otherwise. 1609 */ 1610 extern(C) int function(SoupHSTSEnforcer* hstsEnforcer) isPersistent; 1611 /** 1612 * 1613 * Params: 1614 * hstsEnforcer = a #SoupHSTSEnforcer 1615 * domain = a domain. 1616 * Returns: %TRUE if access to @domain should happen over HTTPS, false 1617 * otherwise. 1618 */ 1619 extern(C) int function(SoupHSTSEnforcer* hstsEnforcer, const(char)* domain) hasValidPolicy; 1620 /** */ 1621 extern(C) void function(SoupHSTSEnforcer* enforcer, SoupHSTSPolicy* oldPolicy, SoupHSTSPolicy* newPolicy) changed; 1622 /** */ 1623 extern(C) void function(SoupHSTSEnforcer* enforcer, SoupMessage* message) hstsEnforced; 1624 /** */ 1625 extern(C) void function() LibsoupReserved1; 1626 /** */ 1627 extern(C) void function() LibsoupReserved2; 1628 /** */ 1629 extern(C) void function() LibsoupReserved3; 1630 /** */ 1631 extern(C) void function() LibsoupReserved4; 1632 } 1633 1634 struct SoupHSTSEnforcerDB 1635 { 1636 SoupHSTSEnforcer parent; 1637 SoupHSTSEnforcerDBPrivate* priv; 1638 } 1639 1640 struct SoupHSTSEnforcerDBClass 1641 { 1642 SoupHSTSEnforcerClass parentClass; 1643 /** */ 1644 extern(C) void function() LibsoupReserved1; 1645 /** */ 1646 extern(C) void function() LibsoupReserved2; 1647 /** */ 1648 extern(C) void function() LibsoupReserved3; 1649 /** */ 1650 extern(C) void function() LibsoupReserved4; 1651 } 1652 1653 struct SoupHSTSEnforcerDBPrivate; 1654 1655 struct SoupHSTSEnforcerPrivate; 1656 1657 struct SoupHSTSPolicy 1658 { 1659 /** 1660 * The domain or hostname that the policy applies to 1661 */ 1662 char* domain; 1663 /** 1664 * The maximum age, in seconds, that the policy is valid 1665 */ 1666 ulong maxAge; 1667 /** 1668 * the policy expiration time, or %NULL for a permanent session policy 1669 */ 1670 SoupDate* expires; 1671 /** 1672 * %TRUE if the policy applies on subdomains 1673 */ 1674 bool includeSubdomains; 1675 } 1676 1677 struct SoupLogger 1678 { 1679 GObject parent; 1680 } 1681 1682 struct SoupLoggerClass 1683 { 1684 GObjectClass parentClass; 1685 /** */ 1686 extern(C) void function() LibsoupReserved1; 1687 /** */ 1688 extern(C) void function() LibsoupReserved2; 1689 /** */ 1690 extern(C) void function() LibsoupReserved3; 1691 /** */ 1692 extern(C) void function() LibsoupReserved4; 1693 } 1694 1695 struct SoupMessage 1696 { 1697 GObject parent; 1698 /** 1699 * the HTTP method 1700 */ 1701 const(char)* method; 1702 /** 1703 * the HTTP status code 1704 */ 1705 uint statusCode; 1706 /** 1707 * the status phrase associated with @status_code 1708 */ 1709 char* reasonPhrase; 1710 /** 1711 * the request body 1712 */ 1713 SoupMessageBody* requestBody; 1714 /** 1715 * the request headers 1716 */ 1717 SoupMessageHeaders* requestHeaders; 1718 /** 1719 * the response body 1720 */ 1721 SoupMessageBody* responseBody; 1722 /** 1723 * the response headers 1724 */ 1725 SoupMessageHeaders* responseHeaders; 1726 } 1727 1728 struct SoupMessageBody 1729 { 1730 /** 1731 * the data 1732 */ 1733 const(char)* data; 1734 /** 1735 * length of @data 1736 */ 1737 long length; 1738 } 1739 1740 struct SoupMessageClass 1741 { 1742 GObjectClass parentClass; 1743 /** */ 1744 extern(C) void function(SoupMessage* msg) wroteInformational; 1745 /** */ 1746 extern(C) void function(SoupMessage* msg) wroteHeaders; 1747 /** */ 1748 extern(C) void function(SoupMessage* msg) wroteChunk; 1749 /** */ 1750 extern(C) void function(SoupMessage* msg) wroteBody; 1751 /** */ 1752 extern(C) void function(SoupMessage* msg) gotInformational; 1753 /** */ 1754 extern(C) void function(SoupMessage* msg) gotHeaders; 1755 /** */ 1756 extern(C) void function(SoupMessage* msg, SoupBuffer* chunk) gotChunk; 1757 /** */ 1758 extern(C) void function(SoupMessage* msg) gotBody; 1759 /** */ 1760 extern(C) void function(SoupMessage* msg) restarted; 1761 /** */ 1762 extern(C) void function(SoupMessage* msg) finished; 1763 /** */ 1764 extern(C) void function(SoupMessage* msg) starting; 1765 /** */ 1766 extern(C) void function() LibsoupReserved1; 1767 /** */ 1768 extern(C) void function() LibsoupReserved2; 1769 /** */ 1770 extern(C) void function() LibsoupReserved3; 1771 } 1772 1773 struct SoupMessageHeaders; 1774 1775 struct SoupMessageHeadersIter 1776 { 1777 void*[3] dummy; 1778 } 1779 1780 struct SoupMessageQueue; 1781 1782 struct SoupMessageQueueItem; 1783 1784 struct SoupMultipart; 1785 1786 struct SoupMultipartInputStream 1787 { 1788 GFilterInputStream parentInstance; 1789 SoupMultipartInputStreamPrivate* priv; 1790 } 1791 1792 struct SoupMultipartInputStreamClass 1793 { 1794 GFilterInputStreamClass parentClass; 1795 } 1796 1797 struct SoupMultipartInputStreamPrivate; 1798 1799 struct SoupPasswordManager; 1800 1801 struct SoupPasswordManagerInterface 1802 { 1803 GTypeInterface base; 1804 /** */ 1805 extern(C) void function(SoupPasswordManager* passwordManager, SoupMessage* msg, SoupAuth* auth, int retrying, GMainContext* asyncContext, GCancellable* cancellable, SoupPasswordManagerCallback callback, void* userData) getPasswordsAsync; 1806 /** */ 1807 extern(C) void function(SoupPasswordManager* passwordManager, SoupMessage* msg, SoupAuth* auth, GCancellable* cancellable) getPasswordsSync; 1808 } 1809 1810 struct SoupProxyResolver; 1811 1812 struct SoupProxyResolverDefault 1813 { 1814 GObject parent; 1815 } 1816 1817 struct SoupProxyResolverDefaultClass 1818 { 1819 GObjectClass parentClass; 1820 } 1821 1822 struct SoupProxyResolverInterface 1823 { 1824 GTypeInterface base; 1825 /** */ 1826 extern(C) void function(SoupProxyResolver* proxyResolver, SoupMessage* msg, GMainContext* asyncContext, GCancellable* cancellable, SoupProxyResolverCallback callback, void* userData) getProxyAsync; 1827 /** */ 1828 extern(C) uint function(SoupProxyResolver* proxyResolver, SoupMessage* msg, GCancellable* cancellable, SoupAddress** addr) getProxySync; 1829 } 1830 1831 struct SoupProxyURIResolver; 1832 1833 struct SoupProxyURIResolverInterface 1834 { 1835 GTypeInterface base; 1836 /** */ 1837 extern(C) void function(SoupProxyURIResolver* proxyUriResolver, SoupURI* uri, GMainContext* asyncContext, GCancellable* cancellable, SoupProxyURIResolverCallback callback, void* userData) getProxyUriAsync; 1838 /** 1839 * 1840 * Params: 1841 * proxyUriResolver = the #SoupProxyURIResolver 1842 * uri = the #SoupURI you want a proxy for 1843 * cancellable = a #GCancellable, or %NULL 1844 * proxyUri = on return, will contain the proxy URI 1845 * Returns: %SOUP_STATUS_OK if successful, or a transport-level 1846 * error. 1847 */ 1848 extern(C) uint function(SoupProxyURIResolver* proxyUriResolver, SoupURI* uri, GCancellable* cancellable, SoupURI** proxyUri) getProxyUriSync; 1849 /** */ 1850 extern(C) void function() LibsoupReserved1; 1851 /** */ 1852 extern(C) void function() LibsoupReserved2; 1853 /** */ 1854 extern(C) void function() LibsoupReserved3; 1855 /** */ 1856 extern(C) void function() LibsoupReserved4; 1857 } 1858 1859 /** 1860 * Represents a byte range as used in the Range header. 1861 * 1862 * If @end is non-negative, then @start and @end represent the bounds 1863 * of of the range, counting from 0. (Eg, the first 500 bytes would be 1864 * represented as @start = 0 and @end = 499.) 1865 * 1866 * If @end is -1 and @start is non-negative, then this represents a 1867 * range starting at @start and ending with the last byte of the 1868 * requested resource body. (Eg, all but the first 500 bytes would be 1869 * @start = 500, and @end = -1.) 1870 * 1871 * If @end is -1 and @start is negative, then it represents a "suffix 1872 * range", referring to the last -@start bytes of the resource body. 1873 * (Eg, the last 500 bytes would be @start = -500 and @end = -1.) 1874 * 1875 * Since: 2.26 1876 */ 1877 struct SoupRange 1878 { 1879 /** 1880 * the start of the range 1881 */ 1882 long start; 1883 /** 1884 * the end of the range 1885 */ 1886 long end; 1887 } 1888 1889 struct SoupRequest 1890 { 1891 GObject parent; 1892 SoupRequestPrivate* priv; 1893 } 1894 1895 struct SoupRequestClass 1896 { 1897 GObjectClass parent; 1898 char** schemes; 1899 /** */ 1900 extern(C) int function(SoupRequest* reqBase, SoupURI* uri, GError** err) checkUri; 1901 /** 1902 * 1903 * Params: 1904 * request = a #SoupRequest 1905 * cancellable = a #GCancellable or %NULL 1906 * Returns: a #GInputStream that can be used to 1907 * read from the URI pointed to by @request. 1908 * 1909 * Throws: GException on failure. 1910 */ 1911 extern(C) GInputStream* function(SoupRequest* request, GCancellable* cancellable, GError** err) send; 1912 /** */ 1913 extern(C) void function(SoupRequest* request, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) sendAsync; 1914 /** 1915 * 1916 * Params: 1917 * request = a #SoupRequest 1918 * result = the #GAsyncResult 1919 * Returns: a #GInputStream that can be used to 1920 * read from the URI pointed to by @request. 1921 * 1922 * Throws: GException on failure. 1923 */ 1924 extern(C) GInputStream* function(SoupRequest* request, GAsyncResult* result, GError** err) sendFinish; 1925 /** 1926 * 1927 * Params: 1928 * request = a #SoupRequest 1929 * Returns: the length of the data represented by @request, 1930 * or -1 if not known. 1931 */ 1932 extern(C) long function(SoupRequest* request) getContentLength; 1933 /** 1934 * 1935 * Params: 1936 * request = a #SoupRequest 1937 * Returns: the type of the data represented by 1938 * @request, or %NULL if not known. 1939 */ 1940 extern(C) const(char)* function(SoupRequest* request) getContentType; 1941 } 1942 1943 struct SoupRequestData 1944 { 1945 SoupRequest parent; 1946 SoupRequestDataPrivate* priv; 1947 } 1948 1949 struct SoupRequestDataClass 1950 { 1951 SoupRequestClass parent; 1952 } 1953 1954 struct SoupRequestDataPrivate; 1955 1956 struct SoupRequestFile 1957 { 1958 SoupRequest parent; 1959 SoupRequestFilePrivate* priv; 1960 } 1961 1962 struct SoupRequestFileClass 1963 { 1964 SoupRequestClass parent; 1965 } 1966 1967 struct SoupRequestFilePrivate; 1968 1969 struct SoupRequestHTTP 1970 { 1971 SoupRequest parent; 1972 SoupRequestHTTPPrivate* priv; 1973 } 1974 1975 struct SoupRequestHTTPClass 1976 { 1977 SoupRequestClass parent; 1978 } 1979 1980 struct SoupRequestHTTPPrivate; 1981 1982 struct SoupRequestPrivate; 1983 1984 struct SoupRequester 1985 { 1986 GObject parent; 1987 SoupRequesterPrivate* priv; 1988 } 1989 1990 struct SoupRequesterClass 1991 { 1992 GObjectClass parentClass; 1993 } 1994 1995 struct SoupRequesterPrivate; 1996 1997 struct SoupServer 1998 { 1999 GObject parent; 2000 } 2001 2002 struct SoupServerClass 2003 { 2004 GObjectClass parentClass; 2005 /** */ 2006 extern(C) void function(SoupServer* server, SoupMessage* msg, SoupClientContext* client) requestStarted; 2007 /** */ 2008 extern(C) void function(SoupServer* server, SoupMessage* msg, SoupClientContext* client) requestRead; 2009 /** */ 2010 extern(C) void function(SoupServer* server, SoupMessage* msg, SoupClientContext* client) requestFinished; 2011 /** */ 2012 extern(C) void function(SoupServer* server, SoupMessage* msg, SoupClientContext* client) requestAborted; 2013 /** */ 2014 extern(C) void function() LibsoupReserved1; 2015 /** */ 2016 extern(C) void function() LibsoupReserved2; 2017 /** */ 2018 extern(C) void function() LibsoupReserved3; 2019 /** */ 2020 extern(C) void function() LibsoupReserved4; 2021 } 2022 2023 struct SoupSession 2024 { 2025 GObject parent; 2026 } 2027 2028 struct SoupSessionAsync 2029 { 2030 SoupSession parent; 2031 } 2032 2033 struct SoupSessionAsyncClass 2034 { 2035 SoupSessionClass parentClass; 2036 /** */ 2037 extern(C) void function() LibsoupReserved1; 2038 /** */ 2039 extern(C) void function() LibsoupReserved2; 2040 /** */ 2041 extern(C) void function() LibsoupReserved3; 2042 /** */ 2043 extern(C) void function() LibsoupReserved4; 2044 } 2045 2046 struct SoupSessionClass 2047 { 2048 GObjectClass parentClass; 2049 /** */ 2050 extern(C) void function(SoupSession* session, SoupMessage* msg, SoupSocket* socket) requestStarted; 2051 /** */ 2052 extern(C) void function(SoupSession* session, SoupMessage* msg, SoupAuth* auth, int retrying) authenticate; 2053 /** */ 2054 extern(C) void function(SoupSession* session, SoupMessage* msg, SoupSessionCallback callback, void* userData) queueMessage; 2055 /** */ 2056 extern(C) void function(SoupSession* session, SoupMessage* msg) requeueMessage; 2057 /** 2058 * 2059 * Params: 2060 * session = a #SoupSession 2061 * msg = the message to send 2062 * Returns: the HTTP status code of the response 2063 */ 2064 extern(C) uint function(SoupSession* session, SoupMessage* msg) sendMessage; 2065 /** */ 2066 extern(C) void function(SoupSession* session, SoupMessage* msg, uint statusCode) cancelMessage; 2067 /** */ 2068 extern(C) void function(SoupSession* session, SoupMessage* msg, SoupAuth* auth, int retrying) authRequired; 2069 /** */ 2070 extern(C) void function(SoupSession* session) flushQueue; 2071 /** */ 2072 extern(C) void function(SoupSession* session) kick; 2073 /** */ 2074 extern(C) void function() LibsoupReserved4; 2075 } 2076 2077 struct SoupSessionFeature; 2078 2079 /** 2080 * The interface implemented by #SoupSessionFeature<!-- -->s. 2081 * 2082 * Since: 2.24 2083 */ 2084 struct SoupSessionFeatureInterface 2085 { 2086 /** 2087 * The parent interface. 2088 */ 2089 GTypeInterface parent; 2090 /** */ 2091 extern(C) void function(SoupSessionFeature* feature, SoupSession* session) attach; 2092 /** */ 2093 extern(C) void function(SoupSessionFeature* feature, SoupSession* session) detach; 2094 /** */ 2095 extern(C) void function(SoupSessionFeature* feature, SoupSession* session, SoupMessage* msg) requestQueued; 2096 /** */ 2097 extern(C) void function(SoupSessionFeature* feature, SoupSession* session, SoupMessage* msg, SoupSocket* socket) requestStarted; 2098 /** */ 2099 extern(C) void function(SoupSessionFeature* feature, SoupSession* session, SoupMessage* msg) requestUnqueued; 2100 /** 2101 * 2102 * Params: 2103 * feature = the "base" feature 2104 * type = the #GType of a "sub-feature" 2105 * Returns: %TRUE if @feature accepted @type as a subfeature. 2106 */ 2107 extern(C) int function(SoupSessionFeature* feature, GType type) addFeature; 2108 /** 2109 * 2110 * Params: 2111 * feature = the "base" feature 2112 * type = the #GType of a "sub-feature" 2113 * Returns: %TRUE if @type was removed from @feature 2114 */ 2115 extern(C) int function(SoupSessionFeature* feature, GType type) removeFeature; 2116 /** 2117 * 2118 * Params: 2119 * feature = the "base" feature 2120 * type = the #GType of a "sub-feature" 2121 * Returns: %TRUE if @feature has a subfeature of type @type 2122 */ 2123 extern(C) int function(SoupSessionFeature* feature, GType type) hasFeature; 2124 } 2125 2126 struct SoupSessionSync 2127 { 2128 SoupSession parent; 2129 } 2130 2131 struct SoupSessionSyncClass 2132 { 2133 SoupSessionClass parentClass; 2134 /** */ 2135 extern(C) void function() LibsoupReserved1; 2136 /** */ 2137 extern(C) void function() LibsoupReserved2; 2138 /** */ 2139 extern(C) void function() LibsoupReserved3; 2140 /** */ 2141 extern(C) void function() LibsoupReserved4; 2142 } 2143 2144 struct SoupSocket 2145 { 2146 GObject parent; 2147 } 2148 2149 struct SoupSocketClass 2150 { 2151 GObjectClass parentClass; 2152 /** */ 2153 extern(C) void function(SoupSocket* sock) readable; 2154 /** */ 2155 extern(C) void function(SoupSocket* sock) writable; 2156 /** */ 2157 extern(C) void function(SoupSocket* sock) disconnected; 2158 /** */ 2159 extern(C) void function(SoupSocket* listener, SoupSocket* newSock) newConnection; 2160 /** */ 2161 extern(C) void function() LibsoupReserved1; 2162 /** */ 2163 extern(C) void function() LibsoupReserved2; 2164 /** */ 2165 extern(C) void function() LibsoupReserved3; 2166 /** */ 2167 extern(C) void function() LibsoupReserved4; 2168 } 2169 2170 struct SoupURI 2171 { 2172 /** 2173 * the URI scheme (eg, "http") 2174 */ 2175 const(char)* scheme; 2176 /** 2177 * a username, or %NULL 2178 */ 2179 char* user; 2180 /** 2181 * a password, or %NULL 2182 */ 2183 char* password; 2184 /** 2185 * the hostname or IP address, or %NULL 2186 */ 2187 char* host; 2188 /** 2189 * the port number on @host 2190 */ 2191 uint port; 2192 /** 2193 * the path on @host 2194 */ 2195 char* path; 2196 /** 2197 * a query for @path, or %NULL 2198 */ 2199 char* query; 2200 /** 2201 * a fragment identifier within @path, or %NULL 2202 */ 2203 char* fragment; 2204 } 2205 2206 struct SoupWebsocketConnection 2207 { 2208 GObject parent; 2209 SoupWebsocketConnectionPrivate* pv; 2210 } 2211 2212 /** 2213 * The abstract base class for #SoupWebsocketConnection 2214 * 2215 * Since: 2.50 2216 */ 2217 struct SoupWebsocketConnectionClass 2218 { 2219 GObjectClass parent; 2220 /** */ 2221 extern(C) void function(SoupWebsocketConnection* self, SoupWebsocketDataType type, GBytes* message) message; 2222 /** */ 2223 extern(C) void function(SoupWebsocketConnection* self, GError* error) error; 2224 /** */ 2225 extern(C) void function(SoupWebsocketConnection* self) closing; 2226 /** */ 2227 extern(C) void function(SoupWebsocketConnection* self) closed; 2228 /** */ 2229 extern(C) void function(SoupWebsocketConnection* self, GBytes* message) pong; 2230 } 2231 2232 struct SoupWebsocketConnectionPrivate; 2233 2234 struct SoupWebsocketExtension 2235 { 2236 GObject parent; 2237 } 2238 2239 /** 2240 * The class structure for the SoupWebsocketExtension. 2241 * 2242 * Since: 2.68 2243 */ 2244 struct SoupWebsocketExtensionClass 2245 { 2246 /** 2247 * the parent class 2248 */ 2249 GObjectClass parentClass; 2250 const(char)* name; 2251 /** 2252 * 2253 * Params: 2254 * extension = a #SoupWebsocketExtension 2255 * connectionType = either %SOUP_WEBSOCKET_CONNECTION_CLIENT or %SOUP_WEBSOCKET_CONNECTION_SERVER 2256 * params = the parameters, or %NULL 2257 * Returns: %TRUE if extension could be configured with the given parameters, or %FALSE otherwise 2258 * 2259 * Throws: GException on failure. 2260 */ 2261 extern(C) int function(SoupWebsocketExtension* extension, SoupWebsocketConnectionType connectionType, GHashTable* params, GError** err) configure; 2262 /** 2263 * 2264 * Params: 2265 * extension = a #SoupWebsocketExtension 2266 * Returns: a new allocated string with the parameters 2267 */ 2268 extern(C) char* function(SoupWebsocketExtension* extension) getRequestParams; 2269 /** 2270 * 2271 * Params: 2272 * extension = a #SoupWebsocketExtension 2273 * Returns: a new allocated string with the parameters 2274 */ 2275 extern(C) char* function(SoupWebsocketExtension* extension) getResponseParams; 2276 /** 2277 * 2278 * Params: 2279 * extension = a #SoupWebsocketExtension 2280 * header = the message header 2281 * payload = the payload data 2282 * Returns: the message payload data, or %NULL in case of error 2283 * 2284 * Throws: GException on failure. 2285 */ 2286 extern(C) GBytes* function(SoupWebsocketExtension* extension, ubyte* header, GBytes* payload, GError** err) processOutgoingMessage; 2287 /** 2288 * 2289 * Params: 2290 * extension = a #SoupWebsocketExtension 2291 * header = the message header 2292 * payload = the payload data 2293 * Returns: the message payload data, or %NULL in case of error 2294 * 2295 * Throws: GException on failure. 2296 */ 2297 extern(C) GBytes* function(SoupWebsocketExtension* extension, ubyte* header, GBytes* payload, GError** err) processIncomingMessage; 2298 /** */ 2299 extern(C) void function() LibsoupReserved1; 2300 /** */ 2301 extern(C) void function() LibsoupReserved2; 2302 /** */ 2303 extern(C) void function() LibsoupReserved3; 2304 /** */ 2305 extern(C) void function() LibsoupReserved4; 2306 } 2307 2308 struct SoupWebsocketExtensionDeflate 2309 { 2310 SoupWebsocketExtension parent; 2311 } 2312 2313 struct SoupWebsocketExtensionDeflateClass 2314 { 2315 SoupWebsocketExtensionClass parentClass; 2316 } 2317 2318 struct SoupWebsocketExtensionManager 2319 { 2320 GObject parent; 2321 } 2322 2323 struct SoupWebsocketExtensionManagerClass 2324 { 2325 GObjectClass parentClass; 2326 } 2327 2328 struct SoupXMLRPCParams; 2329 2330 /** 2331 * The callback function passed to soup_address_resolve_async(). 2332 * 2333 * Params: 2334 * addr = the #SoupAddress that was resolved 2335 * status = %SOUP_STATUS_OK, %SOUP_STATUS_CANT_RESOLVE, or 2336 * %SOUP_STATUS_CANCELLED 2337 * userData = the user data that was passed to 2338 * soup_address_resolve_async() 2339 */ 2340 public alias extern(C) void function(SoupAddress* addr, uint status, void* userData) SoupAddressCallback; 2341 2342 /** 2343 * Callback used by #SoupAuthDomainBasic for authentication purposes. 2344 * The application should verify that @username and @password and valid 2345 * and return %TRUE or %FALSE. 2346 * 2347 * If you are maintaining your own password database (rather than 2348 * using the password to authenticate against some other system like 2349 * PAM or a remote server), you should make sure you know what you are 2350 * doing. In particular, don't store cleartext passwords, or 2351 * easily-computed hashes of cleartext passwords, even if you don't 2352 * care that much about the security of your server, because users 2353 * will frequently use the same password for multiple sites, and so 2354 * compromising any site with a cleartext (or easily-cracked) password 2355 * database may give attackers access to other more-interesting sites 2356 * as well. 2357 * 2358 * Params: 2359 * domain = the domain 2360 * msg = the message being authenticated 2361 * username = the username provided by the client 2362 * password = the password provided by the client 2363 * userData = the data passed to soup_auth_domain_basic_set_auth_callback() 2364 * 2365 * Returns: %TRUE if @username and @password are valid 2366 */ 2367 public alias extern(C) int function(SoupAuthDomain* domain, SoupMessage* msg, const(char)* username, const(char)* password, void* userData) SoupAuthDomainBasicAuthCallback; 2368 2369 /** 2370 * Callback used by #SoupAuthDomainDigest for authentication purposes. 2371 * The application should look up @username in its password database, 2372 * and return the corresponding encoded password (see 2373 * soup_auth_domain_digest_encode_password()). 2374 * 2375 * Params: 2376 * domain = the domain 2377 * msg = the message being authenticated 2378 * username = the username provided by the client 2379 * userData = the data passed to soup_auth_domain_digest_set_auth_callback() 2380 * 2381 * Returns: the encoded password, or %NULL if 2382 * @username is not a valid user. @domain will free the password when 2383 * it is done with it. 2384 */ 2385 public alias extern(C) char* function(SoupAuthDomain* domain, SoupMessage* msg, const(char)* username, void* userData) SoupAuthDomainDigestAuthCallback; 2386 2387 /** 2388 * The prototype for a #SoupAuthDomain filter; see 2389 * soup_auth_domain_set_filter() for details. 2390 * 2391 * Params: 2392 * domain = a #SoupAuthDomain 2393 * msg = a #SoupMessage 2394 * userData = the data passed to soup_auth_domain_set_filter() 2395 * 2396 * Returns: %TRUE if @msg requires authentication, %FALSE if not. 2397 */ 2398 public alias extern(C) int function(SoupAuthDomain* domain, SoupMessage* msg, void* userData) SoupAuthDomainFilter; 2399 2400 /** 2401 * The prototype for a #SoupAuthDomain generic authentication callback. 2402 * 2403 * The callback should look up the user's password, call 2404 * soup_auth_domain_check_password(), and use the return value from 2405 * that method as its own return value. 2406 * 2407 * In general, for security reasons, it is preferable to use the 2408 * auth-domain-specific auth callbacks (eg, 2409 * #SoupAuthDomainBasicAuthCallback and 2410 * #SoupAuthDomainDigestAuthCallback), because they don't require 2411 * keeping a cleartext password database. Most users will use the same 2412 * password for many different sites, meaning if any site with a 2413 * cleartext password database is compromised, accounts on other 2414 * servers might be compromised as well. For many of the cases where 2415 * #SoupServer is used, this is not really relevant, but it may still 2416 * be worth considering. 2417 * 2418 * Params: 2419 * domain = a #SoupAuthDomain 2420 * msg = the #SoupMessage being authenticated 2421 * username = the username from @msg 2422 * userData = the data passed to 2423 * soup_auth_domain_set_generic_auth_callback() 2424 * 2425 * Returns: %TRUE if @msg is authenticated, %FALSE if not. 2426 */ 2427 public alias extern(C) int function(SoupAuthDomain* domain, SoupMessage* msg, const(char)* username, void* userData) SoupAuthDomainGenericAuthCallback; 2428 2429 /** 2430 * The prototype for a chunk allocation callback. This should allocate 2431 * a new #SoupBuffer and return it for the I/O layer to read message 2432 * body data off the network into. 2433 * 2434 * If @max_len is non-0, it indicates the maximum number of bytes that 2435 * could be read, based on what is known about the message size. Note 2436 * that this might be a very large number, and you should not simply 2437 * try to allocate that many bytes blindly. If @max_len is 0, that 2438 * means that libsoup does not know how many bytes remain to be read, 2439 * and the allocator should return a buffer of a size that it finds 2440 * convenient. 2441 * 2442 * If the allocator returns %NULL, the message will be paused. It is 2443 * up to the application to make sure that it gets unpaused when it 2444 * becomes possible to allocate a new buffer. 2445 * 2446 * Deprecated: Use #SoupRequest if you want to read into your 2447 * own buffers. 2448 * 2449 * Params: 2450 * msg = the #SoupMessage the chunk is being allocated for 2451 * maxLen = the maximum length that will be read, or 0. 2452 * userData = the data passed to soup_message_set_chunk_allocator() 2453 * 2454 * Returns: the new buffer (or %NULL) 2455 */ 2456 public alias extern(C) SoupBuffer* function(SoupMessage* msg, size_t maxLen, void* userData) SoupChunkAllocator; 2457 2458 /** 2459 * The prototype for a logging filter. The filter callback will be 2460 * invoked for each request or response, and should analyze it and 2461 * return a #SoupLoggerLogLevel value indicating how much of the 2462 * message to log. Eg, it might choose between %SOUP_LOGGER_LOG_BODY 2463 * and %SOUP_LOGGER_LOG_HEADERS depending on the Content-Type. 2464 * 2465 * Params: 2466 * logger = the #SoupLogger 2467 * msg = the message being logged 2468 * userData = the data passed to soup_logger_set_request_filter() 2469 * or soup_logger_set_response_filter() 2470 * 2471 * Returns: a #SoupLoggerLogLevel value indicating how much of 2472 * the message to log 2473 */ 2474 public alias extern(C) SoupLoggerLogLevel function(SoupLogger* logger, SoupMessage* msg, void* userData) SoupLoggerFilter; 2475 2476 /** 2477 * The prototype for a custom printing callback. 2478 * 2479 * @level indicates what kind of information is being printed. Eg, it 2480 * will be %SOUP_LOGGER_LOG_HEADERS if @data is header data. 2481 * 2482 * @direction is either '<', '>', or ' ', and @data is the single line 2483 * to print; the printer is expected to add a terminating newline. 2484 * 2485 * To get the effect of the default printer, you would do: 2486 * 2487 * <informalexample><programlisting> 2488 * printf ("%c %s\n", direction, data); 2489 * </programlisting></informalexample> 2490 * 2491 * Params: 2492 * logger = the #SoupLogger 2493 * level = the level of the information being printed. 2494 * direction = a single-character prefix to @data 2495 * data = data to print 2496 * userData = the data passed to soup_logger_set_printer() 2497 */ 2498 public alias extern(C) void function(SoupLogger* logger, SoupLoggerLogLevel level, char direction, const(char)* data, void* userData) SoupLoggerPrinter; 2499 2500 /** 2501 * The callback passed to soup_message_headers_foreach(). 2502 * 2503 * Params: 2504 * name = the header name 2505 * value = the header value 2506 * userData = the data passed to soup_message_headers_foreach() 2507 */ 2508 public alias extern(C) void function(const(char)* name, const(char)* value, void* userData) SoupMessageHeadersForeachFunc; 2509 2510 /** */ 2511 public alias extern(C) void function(SoupPasswordManager* passwordManager, SoupMessage* msg, SoupAuth* auth, int retrying, void* userData) SoupPasswordManagerCallback; 2512 2513 /** 2514 * 2515 * 2516 * Deprecated: Use SoupProxyURIResolver instead 2517 */ 2518 public alias extern(C) void function(SoupProxyResolver* proxyResolver, SoupMessage* msg, uint arg, SoupAddress* addr, void* userData) SoupProxyResolverCallback; 2519 2520 /** 2521 * Callback for soup_proxy_uri_resolver_get_proxy_uri_async() 2522 * 2523 * Params: 2524 * resolver = the #SoupProxyURIResolver 2525 * status = a #SoupStatus 2526 * proxyUri = the resolved proxy URI, or %NULL 2527 * userData = data passed to soup_proxy_uri_resolver_get_proxy_uri_async() 2528 */ 2529 public alias extern(C) void function(SoupProxyURIResolver* resolver, uint status, SoupURI* proxyUri, void* userData) SoupProxyURIResolverCallback; 2530 2531 /** 2532 * A callback used to handle requests to a #SoupServer. 2533 * 2534 * @path and @query contain the likewise-named components of the 2535 * Request-URI, subject to certain assumptions. By default, 2536 * #SoupServer decodes all percent-encoding in the URI path, such that 2537 * "/foo%<!-- -->2Fbar" is treated the same as "/foo/bar". If your 2538 * server is serving resources in some non-POSIX-filesystem namespace, 2539 * you may want to distinguish those as two distinct paths. In that 2540 * case, you can set the %SOUP_SERVER_RAW_PATHS property when creating 2541 * the #SoupServer, and it will leave those characters undecoded. (You 2542 * may want to call soup_uri_normalize() to decode any percent-encoded 2543 * characters that you aren't handling specially.) 2544 * 2545 * @query contains the query component of the Request-URI parsed 2546 * according to the rules for HTML form handling. Although this is the 2547 * only commonly-used query string format in HTTP, there is nothing 2548 * that actually requires that HTTP URIs use that format; if your 2549 * server needs to use some other format, you can just ignore @query, 2550 * and call soup_message_get_uri() and parse the URI's query field 2551 * yourself. 2552 * 2553 * See soup_server_add_handler() and soup_server_add_early_handler() 2554 * for details of what handlers can/should do. 2555 * 2556 * Params: 2557 * server = the #SoupServer 2558 * msg = the message being processed 2559 * path = the path component of @msg's Request-URI 2560 * query = the parsed query 2561 * component of @msg's Request-URI 2562 * client = additional contextual information about the client 2563 * userData = the data passed to soup_server_add_handler() or 2564 * soup_server_add_early_handler(). 2565 */ 2566 public alias extern(C) void function(SoupServer* server, SoupMessage* msg, const(char)* path, GHashTable* query, SoupClientContext* client, void* userData) SoupServerCallback; 2567 2568 /** 2569 * A callback used to handle WebSocket requests to a #SoupServer. The 2570 * callback will be invoked after sending the handshake response back 2571 * to the client (and is only invoked if the handshake was 2572 * successful). 2573 * 2574 * @path contains the path of the Request-URI, subject to the same 2575 * rules as #SoupServerCallback (qv). 2576 * 2577 * Params: 2578 * server = the #SoupServer 2579 * connection = the newly created WebSocket connection 2580 * path = the path component of @msg's Request-URI 2581 * client = additional contextual information about the client 2582 * userData = the data passed to @soup_server_add_handler 2583 */ 2584 public alias extern(C) void function(SoupServer* server, SoupWebsocketConnection* connection, const(char)* path, SoupClientContext* client, void* userData) SoupServerWebsocketCallback; 2585 2586 /** 2587 * Prototype for the callback passed to soup_session_queue_message(), 2588 * qv. 2589 * 2590 * Params: 2591 * session = the session 2592 * msg = the message that has finished 2593 * userData = the data passed to soup_session_queue_message 2594 */ 2595 public alias extern(C) void function(SoupSession* session, SoupMessage* msg, void* userData) SoupSessionCallback; 2596 2597 /** 2598 * Prototype for the progress callback passed to soup_session_connect_async(). 2599 * 2600 * Params: 2601 * session = the #SoupSession 2602 * event = a #GSocketClientEvent 2603 * connection = the current state of the network connection 2604 * userData = the data passed to soup_session_connect_async(). 2605 * 2606 * Since: 2.62 2607 */ 2608 public alias extern(C) void function(SoupSession* session, GSocketClientEvent event, GIOStream* connection, void* userData) SoupSessionConnectProgressCallback; 2609 2610 /** 2611 * The callback function passed to soup_socket_connect_async(). 2612 * 2613 * Params: 2614 * sock = the #SoupSocket 2615 * status = an HTTP status code indicating success or failure 2616 * userData = the data passed to soup_socket_connect_async() 2617 */ 2618 public alias extern(C) void function(SoupSocket* sock, uint status, void* userData) SoupSocketCallback; 2619 version ( Windows ) { 2620 public import core.sys.windows.winsock2 : sockaddr; 2621 } 2622 else { 2623 public import core.sys.posix.sys.socket : sockaddr; 2624 } 2625 2626 /** 2627 * This can be passed to any #SoupAddress method that expects a port, 2628 * to indicate that you don't care what port is used. 2629 */ 2630 enum ADDRESS_ANY_PORT = 0; 2631 alias SOUP_ADDRESS_ANY_PORT = ADDRESS_ANY_PORT; 2632 2633 /** 2634 * Alias for the #SoupAddress:family property. (The 2635 * #SoupAddressFamily for this address.) 2636 */ 2637 enum ADDRESS_FAMILY = "family"; 2638 alias SOUP_ADDRESS_FAMILY = ADDRESS_FAMILY; 2639 2640 /** 2641 * Alias for the #SoupAddress:name property. (The hostname for 2642 * this address.) 2643 */ 2644 enum ADDRESS_NAME = "name"; 2645 alias SOUP_ADDRESS_NAME = ADDRESS_NAME; 2646 2647 /** 2648 * An alias for the #SoupAddress:physical property. (The 2649 * stringified IP address for this address.) 2650 */ 2651 enum ADDRESS_PHYSICAL = "physical"; 2652 alias SOUP_ADDRESS_PHYSICAL = ADDRESS_PHYSICAL; 2653 2654 /** 2655 * An alias for the #SoupAddress:port property. (The port for 2656 * this address.) 2657 */ 2658 enum ADDRESS_PORT = "port"; 2659 alias SOUP_ADDRESS_PORT = ADDRESS_PORT; 2660 2661 /** 2662 * Alias for the #SoupAddress:protocol property. (The URI scheme 2663 * used with this address.) 2664 */ 2665 enum ADDRESS_PROTOCOL = "protocol"; 2666 alias SOUP_ADDRESS_PROTOCOL = ADDRESS_PROTOCOL; 2667 2668 /** 2669 * An alias for the #SoupAddress:sockaddr property. (A pointer 2670 * to the struct sockaddr for this address.) 2671 */ 2672 enum ADDRESS_SOCKADDR = "sockaddr"; 2673 alias SOUP_ADDRESS_SOCKADDR = ADDRESS_SOCKADDR; 2674 2675 /** 2676 * Alias for the #SoupAuthDomain:add-path property. (Shortcut 2677 * for calling soup_auth_domain_add_path().) 2678 */ 2679 enum AUTH_DOMAIN_ADD_PATH = "add-path"; 2680 alias SOUP_AUTH_DOMAIN_ADD_PATH = AUTH_DOMAIN_ADD_PATH; 2681 2682 /** 2683 * Alias for the #SoupAuthDomainBasic:auth-callback property. 2684 * (The #SoupAuthDomainBasicAuthCallback.) 2685 */ 2686 enum AUTH_DOMAIN_BASIC_AUTH_CALLBACK = "auth-callback"; 2687 alias SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK = AUTH_DOMAIN_BASIC_AUTH_CALLBACK; 2688 2689 /** 2690 * Alias for the #SoupAuthDomainBasic:auth-data property. 2691 * (The data to pass to the #SoupAuthDomainBasicAuthCallback.) 2692 */ 2693 enum AUTH_DOMAIN_BASIC_AUTH_DATA = "auth-data"; 2694 alias SOUP_AUTH_DOMAIN_BASIC_AUTH_DATA = AUTH_DOMAIN_BASIC_AUTH_DATA; 2695 2696 /** 2697 * Alias for the #SoupAuthDomainDigest:auth-callback property. 2698 * (The #SoupAuthDomainDigestAuthCallback.) 2699 */ 2700 enum AUTH_DOMAIN_DIGEST_AUTH_CALLBACK = "auth-callback"; 2701 alias SOUP_AUTH_DOMAIN_DIGEST_AUTH_CALLBACK = AUTH_DOMAIN_DIGEST_AUTH_CALLBACK; 2702 2703 /** 2704 * Alias for the #SoupAuthDomainDigest:auth-callback property. 2705 * (The #SoupAuthDomainDigestAuthCallback.) 2706 */ 2707 enum AUTH_DOMAIN_DIGEST_AUTH_DATA = "auth-data"; 2708 alias SOUP_AUTH_DOMAIN_DIGEST_AUTH_DATA = AUTH_DOMAIN_DIGEST_AUTH_DATA; 2709 2710 /** 2711 * Alias for the #SoupAuthDomain:filter property. (The 2712 * #SoupAuthDomainFilter for the domain.) 2713 */ 2714 enum AUTH_DOMAIN_FILTER = "filter"; 2715 alias SOUP_AUTH_DOMAIN_FILTER = AUTH_DOMAIN_FILTER; 2716 2717 /** 2718 * Alias for the #SoupAuthDomain:filter-data property. (Data 2719 * to pass to the #SoupAuthDomainFilter.) 2720 */ 2721 enum AUTH_DOMAIN_FILTER_DATA = "filter-data"; 2722 alias SOUP_AUTH_DOMAIN_FILTER_DATA = AUTH_DOMAIN_FILTER_DATA; 2723 2724 /** 2725 * Alias for the #SoupAuthDomain:generic-auth-callback property. 2726 * (The #SoupAuthDomainGenericAuthCallback.) 2727 */ 2728 enum AUTH_DOMAIN_GENERIC_AUTH_CALLBACK = "generic-auth-callback"; 2729 alias SOUP_AUTH_DOMAIN_GENERIC_AUTH_CALLBACK = AUTH_DOMAIN_GENERIC_AUTH_CALLBACK; 2730 2731 /** 2732 * Alias for the #SoupAuthDomain:generic-auth-data property. 2733 * (The data to pass to the #SoupAuthDomainGenericAuthCallback.) 2734 */ 2735 enum AUTH_DOMAIN_GENERIC_AUTH_DATA = "generic-auth-data"; 2736 alias SOUP_AUTH_DOMAIN_GENERIC_AUTH_DATA = AUTH_DOMAIN_GENERIC_AUTH_DATA; 2737 2738 /** 2739 * Alias for the #SoupAuthDomain:proxy property. (Whether or 2740 * not this is a proxy auth domain.) 2741 */ 2742 enum AUTH_DOMAIN_PROXY = "proxy"; 2743 alias SOUP_AUTH_DOMAIN_PROXY = AUTH_DOMAIN_PROXY; 2744 2745 /** 2746 * Alias for the #SoupAuthDomain:realm property. (The realm of 2747 * this auth domain.) 2748 */ 2749 enum AUTH_DOMAIN_REALM = "realm"; 2750 alias SOUP_AUTH_DOMAIN_REALM = AUTH_DOMAIN_REALM; 2751 2752 /** 2753 * Alias for the #SoupAuthDomain:remove-path property. 2754 * (Shortcut for calling soup_auth_domain_remove_path().) 2755 */ 2756 enum AUTH_DOMAIN_REMOVE_PATH = "remove-path"; 2757 alias SOUP_AUTH_DOMAIN_REMOVE_PATH = AUTH_DOMAIN_REMOVE_PATH; 2758 2759 /** 2760 * An alias for the #SoupAuth:host property. (The 2761 * host being authenticated to.) 2762 */ 2763 enum AUTH_HOST = "host"; 2764 alias SOUP_AUTH_HOST = AUTH_HOST; 2765 2766 /** 2767 * An alias for the #SoupAuth:is-authenticated property. 2768 * (Whether or not the auth has been authenticated.) 2769 */ 2770 enum AUTH_IS_AUTHENTICATED = "is-authenticated"; 2771 alias SOUP_AUTH_IS_AUTHENTICATED = AUTH_IS_AUTHENTICATED; 2772 2773 /** 2774 * An alias for the #SoupAuth:is-for-proxy property. (Whether 2775 * or not the auth is for a proxy server.) 2776 */ 2777 enum AUTH_IS_FOR_PROXY = "is-for-proxy"; 2778 alias SOUP_AUTH_IS_FOR_PROXY = AUTH_IS_FOR_PROXY; 2779 2780 /** 2781 * An alias for the #SoupAuth:realm property. (The 2782 * authentication realm.) 2783 */ 2784 enum AUTH_REALM = "realm"; 2785 alias SOUP_AUTH_REALM = AUTH_REALM; 2786 2787 /** 2788 * An alias for the #SoupAuth:scheme-name property. (The 2789 * authentication scheme name.) 2790 */ 2791 enum AUTH_SCHEME_NAME = "scheme-name"; 2792 alias SOUP_AUTH_SCHEME_NAME = AUTH_SCHEME_NAME; 2793 2794 enum CHAR_HTTP_CTL = 16; 2795 alias SOUP_CHAR_HTTP_CTL = CHAR_HTTP_CTL; 2796 2797 enum CHAR_HTTP_SEPARATOR = 8; 2798 alias SOUP_CHAR_HTTP_SEPARATOR = CHAR_HTTP_SEPARATOR; 2799 2800 enum CHAR_URI_GEN_DELIMS = 2; 2801 alias SOUP_CHAR_URI_GEN_DELIMS = CHAR_URI_GEN_DELIMS; 2802 2803 enum CHAR_URI_PERCENT_ENCODED = 1; 2804 alias SOUP_CHAR_URI_PERCENT_ENCODED = CHAR_URI_PERCENT_ENCODED; 2805 2806 enum CHAR_URI_SUB_DELIMS = 4; 2807 alias SOUP_CHAR_URI_SUB_DELIMS = CHAR_URI_SUB_DELIMS; 2808 2809 /** 2810 * Alias for the #SoupCookieJar:accept-policy property. 2811 */ 2812 enum COOKIE_JAR_ACCEPT_POLICY = "accept-policy"; 2813 alias SOUP_COOKIE_JAR_ACCEPT_POLICY = COOKIE_JAR_ACCEPT_POLICY; 2814 2815 /** 2816 * Alias for the #SoupCookieJarDB:filename property. (The 2817 * cookie-storage filename.) 2818 */ 2819 enum COOKIE_JAR_DB_FILENAME = "filename"; 2820 alias SOUP_COOKIE_JAR_DB_FILENAME = COOKIE_JAR_DB_FILENAME; 2821 2822 /** 2823 * Alias for the #SoupCookieJar:read-only property. (Whether 2824 * or not the cookie jar is read-only.) 2825 */ 2826 enum COOKIE_JAR_READ_ONLY = "read-only"; 2827 alias SOUP_COOKIE_JAR_READ_ONLY = COOKIE_JAR_READ_ONLY; 2828 2829 /** 2830 * Alias for the #SoupCookieJarText:filename property. (The 2831 * cookie-storage filename.) 2832 */ 2833 enum COOKIE_JAR_TEXT_FILENAME = "filename"; 2834 alias SOUP_COOKIE_JAR_TEXT_FILENAME = COOKIE_JAR_TEXT_FILENAME; 2835 2836 /** 2837 * A constant corresponding to 1 day, for use with soup_cookie_new() 2838 * and soup_cookie_set_max_age(). 2839 */ 2840 enum COOKIE_MAX_AGE_ONE_DAY = 0; 2841 alias SOUP_COOKIE_MAX_AGE_ONE_DAY = COOKIE_MAX_AGE_ONE_DAY; 2842 2843 /** 2844 * A constant corresponding to 1 hour, for use with soup_cookie_new() 2845 * and soup_cookie_set_max_age(). 2846 */ 2847 enum COOKIE_MAX_AGE_ONE_HOUR = 3600; 2848 alias SOUP_COOKIE_MAX_AGE_ONE_HOUR = COOKIE_MAX_AGE_ONE_HOUR; 2849 2850 /** 2851 * A constant corresponding to 1 week, for use with soup_cookie_new() 2852 * and soup_cookie_set_max_age(). 2853 */ 2854 enum COOKIE_MAX_AGE_ONE_WEEK = 0; 2855 alias SOUP_COOKIE_MAX_AGE_ONE_WEEK = COOKIE_MAX_AGE_ONE_WEEK; 2856 2857 /** 2858 * A constant corresponding to 1 year, for use with soup_cookie_new() 2859 * and soup_cookie_set_max_age(). 2860 */ 2861 enum COOKIE_MAX_AGE_ONE_YEAR = 0; 2862 alias SOUP_COOKIE_MAX_AGE_ONE_YEAR = COOKIE_MAX_AGE_ONE_YEAR; 2863 2864 /** 2865 * A macro containing the value 2866 * <literal>"multipart/form-data"</literal>; the MIME type used for 2867 * posting form data that contains files to be uploaded. 2868 */ 2869 enum FORM_MIME_TYPE_MULTIPART = "multipart/form-data"; 2870 alias SOUP_FORM_MIME_TYPE_MULTIPART = FORM_MIME_TYPE_MULTIPART; 2871 2872 /** 2873 * A macro containing the value 2874 * <literal>"application/x-www-form-urlencoded"</literal>; the default 2875 * MIME type for POSTing HTML form data. 2876 */ 2877 enum FORM_MIME_TYPE_URLENCODED = "application/x-www-form-urlencoded"; 2878 alias SOUP_FORM_MIME_TYPE_URLENCODED = FORM_MIME_TYPE_URLENCODED; 2879 2880 enum HSTS_ENFORCER_DB_FILENAME = "filename"; 2881 alias SOUP_HSTS_ENFORCER_DB_FILENAME = HSTS_ENFORCER_DB_FILENAME; 2882 2883 enum HSTS_POLICY_MAX_AGE_PAST = 0; 2884 alias SOUP_HSTS_POLICY_MAX_AGE_PAST = HSTS_POLICY_MAX_AGE_PAST; 2885 2886 /** 2887 * Alias for the #SoupLogger:level property, qv. 2888 */ 2889 enum LOGGER_LEVEL = "level"; 2890 alias SOUP_LOGGER_LEVEL = LOGGER_LEVEL; 2891 2892 /** 2893 * Alias for the #SoupLogger:max-body-size property, qv. 2894 */ 2895 enum LOGGER_MAX_BODY_SIZE = "max-body-size"; 2896 alias SOUP_LOGGER_MAX_BODY_SIZE = LOGGER_MAX_BODY_SIZE; 2897 2898 /** 2899 * Like soup_get_major_version(), but from the headers used at 2900 * application compile time, rather than from the library linked 2901 * against at application run time. 2902 */ 2903 enum MAJOR_VERSION = 2; 2904 alias SOUP_MAJOR_VERSION = MAJOR_VERSION; 2905 2906 /** 2907 * Alias for the #SoupMessage:first-party property. (The 2908 * #SoupURI loaded in the application when the message was 2909 * queued.) 2910 */ 2911 enum MESSAGE_FIRST_PARTY = "first-party"; 2912 alias SOUP_MESSAGE_FIRST_PARTY = MESSAGE_FIRST_PARTY; 2913 2914 /** 2915 * Alias for the #SoupMessage:flags property. (The message's 2916 * #SoupMessageFlags.) 2917 */ 2918 enum MESSAGE_FLAGS = "flags"; 2919 alias SOUP_MESSAGE_FLAGS = MESSAGE_FLAGS; 2920 2921 /** 2922 * Alias for the #SoupMessage:http-version property. (The 2923 * message's #SoupHTTPVersion.) 2924 */ 2925 enum MESSAGE_HTTP_VERSION = "http-version"; 2926 alias SOUP_MESSAGE_HTTP_VERSION = MESSAGE_HTTP_VERSION; 2927 2928 enum MESSAGE_IS_TOP_LEVEL_NAVIGATION = "is-top-level-navigation"; 2929 alias SOUP_MESSAGE_IS_TOP_LEVEL_NAVIGATION = MESSAGE_IS_TOP_LEVEL_NAVIGATION; 2930 2931 /** 2932 * Alias for the #SoupMessage:method property. (The message's 2933 * HTTP method.) 2934 */ 2935 enum MESSAGE_METHOD = "method"; 2936 alias SOUP_MESSAGE_METHOD = MESSAGE_METHOD; 2937 2938 /** 2939 * Sets the priority of the #SoupMessage. See 2940 * soup_message_set_priority() for further details. 2941 */ 2942 enum MESSAGE_PRIORITY = "priority"; 2943 alias SOUP_MESSAGE_PRIORITY = MESSAGE_PRIORITY; 2944 2945 /** 2946 * Alias for the #SoupMessage:reason-phrase property. (The 2947 * message's HTTP response reason phrase.) 2948 */ 2949 enum MESSAGE_REASON_PHRASE = "reason-phrase"; 2950 alias SOUP_MESSAGE_REASON_PHRASE = MESSAGE_REASON_PHRASE; 2951 2952 /** 2953 * Alias for the #SoupMessage:request-body property. (The 2954 * message's HTTP request body.) 2955 */ 2956 enum MESSAGE_REQUEST_BODY = "request-body"; 2957 alias SOUP_MESSAGE_REQUEST_BODY = MESSAGE_REQUEST_BODY; 2958 2959 /** 2960 * Alias for the #SoupMessage:request-body-data property. (The 2961 * message's HTTP request body, as a #GBytes.) 2962 */ 2963 enum MESSAGE_REQUEST_BODY_DATA = "request-body-data"; 2964 alias SOUP_MESSAGE_REQUEST_BODY_DATA = MESSAGE_REQUEST_BODY_DATA; 2965 2966 /** 2967 * Alias for the #SoupMessage:request-headers property. (The 2968 * message's HTTP request headers.) 2969 */ 2970 enum MESSAGE_REQUEST_HEADERS = "request-headers"; 2971 alias SOUP_MESSAGE_REQUEST_HEADERS = MESSAGE_REQUEST_HEADERS; 2972 2973 /** 2974 * Alias for the #SoupMessage:response-body property. (The 2975 * message's HTTP response body.) 2976 */ 2977 enum MESSAGE_RESPONSE_BODY = "response-body"; 2978 alias SOUP_MESSAGE_RESPONSE_BODY = MESSAGE_RESPONSE_BODY; 2979 2980 /** 2981 * Alias for the #SoupMessage:response-body-data property. (The 2982 * message's HTTP response body, as a #GBytes.) 2983 */ 2984 enum MESSAGE_RESPONSE_BODY_DATA = "response-body-data"; 2985 alias SOUP_MESSAGE_RESPONSE_BODY_DATA = MESSAGE_RESPONSE_BODY_DATA; 2986 2987 /** 2988 * Alias for the #SoupMessage:response-headers property. (The 2989 * message's HTTP response headers.) 2990 */ 2991 enum MESSAGE_RESPONSE_HEADERS = "response-headers"; 2992 alias SOUP_MESSAGE_RESPONSE_HEADERS = MESSAGE_RESPONSE_HEADERS; 2993 2994 /** 2995 * Alias for the #SoupMessage:server-side property. (%TRUE if 2996 * the message was created by #SoupServer.) 2997 */ 2998 enum MESSAGE_SERVER_SIDE = "server-side"; 2999 alias SOUP_MESSAGE_SERVER_SIDE = MESSAGE_SERVER_SIDE; 3000 3001 enum MESSAGE_SITE_FOR_COOKIES = "site-for-cookies"; 3002 alias SOUP_MESSAGE_SITE_FOR_COOKIES = MESSAGE_SITE_FOR_COOKIES; 3003 3004 /** 3005 * Alias for the #SoupMessage:status-code property. (The 3006 * message's HTTP response status code.) 3007 */ 3008 enum MESSAGE_STATUS_CODE = "status-code"; 3009 alias SOUP_MESSAGE_STATUS_CODE = MESSAGE_STATUS_CODE; 3010 3011 /** 3012 * Alias for the #SoupMessage:tls-certificate property. (The 3013 * TLS certificate associated with the message, if any.) 3014 */ 3015 enum MESSAGE_TLS_CERTIFICATE = "tls-certificate"; 3016 alias SOUP_MESSAGE_TLS_CERTIFICATE = MESSAGE_TLS_CERTIFICATE; 3017 3018 /** 3019 * Alias for the #SoupMessage:tls-errors property. (The 3020 * verification errors on #SoupMessage:tls-certificate.) 3021 */ 3022 enum MESSAGE_TLS_ERRORS = "tls-errors"; 3023 alias SOUP_MESSAGE_TLS_ERRORS = MESSAGE_TLS_ERRORS; 3024 3025 /** 3026 * Alias for the #SoupMessage:uri property. (The message's 3027 * #SoupURI.) 3028 */ 3029 enum MESSAGE_URI = "uri"; 3030 alias SOUP_MESSAGE_URI = MESSAGE_URI; 3031 3032 /** 3033 * Like soup_get_micro_version(), but from the headers used at 3034 * application compile time, rather than from the library linked 3035 * against at application run time. 3036 */ 3037 enum MICRO_VERSION = 2; 3038 alias SOUP_MICRO_VERSION = MICRO_VERSION; 3039 3040 /** 3041 * Like soup_get_minor_version(), but from the headers used at 3042 * application compile time, rather than from the library linked 3043 * against at application run time. 3044 */ 3045 enum MINOR_VERSION = 74; 3046 alias SOUP_MINOR_VERSION = MINOR_VERSION; 3047 3048 /** 3049 * Alias for the #SoupRequest:session property, qv. 3050 */ 3051 enum REQUEST_SESSION = "session"; 3052 alias SOUP_REQUEST_SESSION = REQUEST_SESSION; 3053 3054 /** 3055 * Alias for the #SoupRequest:uri property, qv. 3056 */ 3057 enum REQUEST_URI = "uri"; 3058 alias SOUP_REQUEST_URI = REQUEST_URI; 3059 3060 /** 3061 * Alias for the #SoupServer:add-websocket-extension property, qv. 3062 */ 3063 enum SERVER_ADD_WEBSOCKET_EXTENSION = "add-websocket-extension"; 3064 alias SOUP_SERVER_ADD_WEBSOCKET_EXTENSION = SERVER_ADD_WEBSOCKET_EXTENSION; 3065 3066 /** 3067 * Alias for the deprecated #SoupServer:async-context 3068 * property, qv. 3069 * 3070 * Deprecated: The new API uses the thread-default #GMainContext 3071 * rather than having an explicitly-specified one. 3072 */ 3073 enum SERVER_ASYNC_CONTEXT = "async-context"; 3074 alias SOUP_SERVER_ASYNC_CONTEXT = SERVER_ASYNC_CONTEXT; 3075 3076 /** 3077 * Alias for the #SoupServer:https-aliases property, qv. 3078 */ 3079 enum SERVER_HTTPS_ALIASES = "https-aliases"; 3080 alias SOUP_SERVER_HTTPS_ALIASES = SERVER_HTTPS_ALIASES; 3081 3082 /** 3083 * Alias for the #SoupServer:http-aliases property, qv. 3084 */ 3085 enum SERVER_HTTP_ALIASES = "http-aliases"; 3086 alias SOUP_SERVER_HTTP_ALIASES = SERVER_HTTP_ALIASES; 3087 3088 /** 3089 * Alias for the #SoupServer:interface property, qv. 3090 * 3091 * Deprecated: #SoupServers can listen on multiple interfaces 3092 * at once now. Use soup_server_listen(), etc, to listen on an 3093 * interface, and soup_server_get_uris() to see what addresses 3094 * are being listened on. 3095 */ 3096 enum SERVER_INTERFACE = "interface"; 3097 alias SOUP_SERVER_INTERFACE = SERVER_INTERFACE; 3098 3099 /** 3100 * Alias for the deprecated #SoupServer:port property, qv. 3101 * 3102 * Deprecated: #SoupServers can listen on multiple interfaces 3103 * at once now. Use soup_server_listen(), etc, to listen on a 3104 * port, and soup_server_get_uris() to see what ports are 3105 * being listened on. 3106 */ 3107 enum SERVER_PORT = "port"; 3108 alias SOUP_SERVER_PORT = SERVER_PORT; 3109 3110 /** 3111 * Alias for the #SoupServer:raw-paths property. (If %TRUE, 3112 * percent-encoding in the Request-URI path will not be 3113 * automatically decoded.) 3114 */ 3115 enum SERVER_RAW_PATHS = "raw-paths"; 3116 alias SOUP_SERVER_RAW_PATHS = SERVER_RAW_PATHS; 3117 3118 /** 3119 * Alias for the #SoupServer:remove-websocket-extension property, qv. 3120 */ 3121 enum SERVER_REMOVE_WEBSOCKET_EXTENSION = "remove-websocket-extension"; 3122 alias SOUP_SERVER_REMOVE_WEBSOCKET_EXTENSION = SERVER_REMOVE_WEBSOCKET_EXTENSION; 3123 3124 /** 3125 * Alias for the #SoupServer:server-header property, qv. 3126 */ 3127 enum SERVER_SERVER_HEADER = "server-header"; 3128 alias SOUP_SERVER_SERVER_HEADER = SERVER_SERVER_HEADER; 3129 3130 /** 3131 * Alias for the #SoupServer:ssl-cert-file property, qv. 3132 * 3133 * Deprecated: use #SoupServer:tls-certificate or 3134 * soup_server_set_ssl_certificate(). 3135 */ 3136 enum SERVER_SSL_CERT_FILE = "ssl-cert-file"; 3137 alias SOUP_SERVER_SSL_CERT_FILE = SERVER_SSL_CERT_FILE; 3138 3139 /** 3140 * Alias for the #SoupServer:ssl-key-file property, qv. 3141 * 3142 * Deprecated: use #SoupServer:tls-certificate or 3143 * soup_server_set_ssl_certificate(). 3144 */ 3145 enum SERVER_SSL_KEY_FILE = "ssl-key-file"; 3146 alias SOUP_SERVER_SSL_KEY_FILE = SERVER_SSL_KEY_FILE; 3147 3148 /** 3149 * Alias for the #SoupServer:tls-certificate property, qv. 3150 */ 3151 enum SERVER_TLS_CERTIFICATE = "tls-certificate"; 3152 alias SOUP_SERVER_TLS_CERTIFICATE = SERVER_TLS_CERTIFICATE; 3153 3154 /** 3155 * Alias for the #SoupSession:accept-language property, qv. 3156 */ 3157 enum SESSION_ACCEPT_LANGUAGE = "accept-language"; 3158 alias SOUP_SESSION_ACCEPT_LANGUAGE = SESSION_ACCEPT_LANGUAGE; 3159 3160 /** 3161 * Alias for the #SoupSession:accept-language-auto property, qv. 3162 */ 3163 enum SESSION_ACCEPT_LANGUAGE_AUTO = "accept-language-auto"; 3164 alias SOUP_SESSION_ACCEPT_LANGUAGE_AUTO = SESSION_ACCEPT_LANGUAGE_AUTO; 3165 3166 /** 3167 * Alias for the #SoupSession:add-feature property, qv. 3168 */ 3169 enum SESSION_ADD_FEATURE = "add-feature"; 3170 alias SOUP_SESSION_ADD_FEATURE = SESSION_ADD_FEATURE; 3171 3172 /** 3173 * Alias for the #SoupSession:add-feature-by-type property, qv. 3174 */ 3175 enum SESSION_ADD_FEATURE_BY_TYPE = "add-feature-by-type"; 3176 alias SOUP_SESSION_ADD_FEATURE_BY_TYPE = SESSION_ADD_FEATURE_BY_TYPE; 3177 3178 /** 3179 * Alias for the #SoupSession:async-context property, qv. 3180 */ 3181 enum SESSION_ASYNC_CONTEXT = "async-context"; 3182 alias SOUP_SESSION_ASYNC_CONTEXT = SESSION_ASYNC_CONTEXT; 3183 3184 /** 3185 * Alias for the #SoupSession:https-aliases property, qv. 3186 */ 3187 enum SESSION_HTTPS_ALIASES = "https-aliases"; 3188 alias SOUP_SESSION_HTTPS_ALIASES = SESSION_HTTPS_ALIASES; 3189 3190 /** 3191 * Alias for the #SoupSession:http-aliases property, qv. 3192 */ 3193 enum SESSION_HTTP_ALIASES = "http-aliases"; 3194 alias SOUP_SESSION_HTTP_ALIASES = SESSION_HTTP_ALIASES; 3195 3196 /** 3197 * Alias for the #SoupSession:idle-timeout property, qv. 3198 */ 3199 enum SESSION_IDLE_TIMEOUT = "idle-timeout"; 3200 alias SOUP_SESSION_IDLE_TIMEOUT = SESSION_IDLE_TIMEOUT; 3201 3202 /** 3203 * Alias for the #SoupSession:local-address property, qv. 3204 */ 3205 enum SESSION_LOCAL_ADDRESS = "local-address"; 3206 alias SOUP_SESSION_LOCAL_ADDRESS = SESSION_LOCAL_ADDRESS; 3207 3208 /** 3209 * Alias for the #SoupSession:max-conns property, qv. 3210 */ 3211 enum SESSION_MAX_CONNS = "max-conns"; 3212 alias SOUP_SESSION_MAX_CONNS = SESSION_MAX_CONNS; 3213 3214 /** 3215 * Alias for the #SoupSession:max-conns-per-host property, qv. 3216 */ 3217 enum SESSION_MAX_CONNS_PER_HOST = "max-conns-per-host"; 3218 alias SOUP_SESSION_MAX_CONNS_PER_HOST = SESSION_MAX_CONNS_PER_HOST; 3219 3220 /** 3221 * Alias for the #SoupSession:proxy-resolver property, qv. 3222 */ 3223 enum SESSION_PROXY_RESOLVER = "proxy-resolver"; 3224 alias SOUP_SESSION_PROXY_RESOLVER = SESSION_PROXY_RESOLVER; 3225 3226 /** 3227 * Alias for the #SoupSession:proxy-uri property, qv. 3228 */ 3229 enum SESSION_PROXY_URI = "proxy-uri"; 3230 alias SOUP_SESSION_PROXY_URI = SESSION_PROXY_URI; 3231 3232 /** 3233 * Alias for the #SoupSession:remove-feature-by-type property, 3234 * qv. 3235 */ 3236 enum SESSION_REMOVE_FEATURE_BY_TYPE = "remove-feature-by-type"; 3237 alias SOUP_SESSION_REMOVE_FEATURE_BY_TYPE = SESSION_REMOVE_FEATURE_BY_TYPE; 3238 3239 /** 3240 * Alias for the #SoupSession:ssl-ca-file property, qv. 3241 */ 3242 enum SESSION_SSL_CA_FILE = "ssl-ca-file"; 3243 alias SOUP_SESSION_SSL_CA_FILE = SESSION_SSL_CA_FILE; 3244 3245 /** 3246 * Alias for the #SoupSession:ssl-strict property, qv. 3247 */ 3248 enum SESSION_SSL_STRICT = "ssl-strict"; 3249 alias SOUP_SESSION_SSL_STRICT = SESSION_SSL_STRICT; 3250 3251 /** 3252 * Alias for the #SoupSession:ssl-use-system-ca-file property, 3253 * qv. 3254 */ 3255 enum SESSION_SSL_USE_SYSTEM_CA_FILE = "ssl-use-system-ca-file"; 3256 alias SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE = SESSION_SSL_USE_SYSTEM_CA_FILE; 3257 3258 /** 3259 * Alias for the #SoupSession:timeout property, qv. 3260 */ 3261 enum SESSION_TIMEOUT = "timeout"; 3262 alias SOUP_SESSION_TIMEOUT = SESSION_TIMEOUT; 3263 3264 /** 3265 * Alias for the #SoupSession:tls-database property, qv. 3266 */ 3267 enum SESSION_TLS_DATABASE = "tls-database"; 3268 alias SOUP_SESSION_TLS_DATABASE = SESSION_TLS_DATABASE; 3269 3270 /** 3271 * Alias for the #SoupSession:tls-interaction property, qv. 3272 */ 3273 enum SESSION_TLS_INTERACTION = "tls-interaction"; 3274 alias SOUP_SESSION_TLS_INTERACTION = SESSION_TLS_INTERACTION; 3275 3276 /** 3277 * Alias for the #SoupSession:user-agent property, qv. 3278 */ 3279 enum SESSION_USER_AGENT = "user-agent"; 3280 alias SOUP_SESSION_USER_AGENT = SESSION_USER_AGENT; 3281 3282 /** 3283 * Alias for the #SoupSession:use-ntlm property, qv. 3284 */ 3285 enum SESSION_USE_NTLM = "use-ntlm"; 3286 alias SOUP_SESSION_USE_NTLM = SESSION_USE_NTLM; 3287 3288 /** 3289 * Alias for the #SoupSession:use-thread-context property, qv. 3290 */ 3291 enum SESSION_USE_THREAD_CONTEXT = "use-thread-context"; 3292 alias SOUP_SESSION_USE_THREAD_CONTEXT = SESSION_USE_THREAD_CONTEXT; 3293 3294 /** 3295 * Alias for the #SoupSocket:async-context property. (The 3296 * socket's #GMainContext.) 3297 */ 3298 enum SOCKET_ASYNC_CONTEXT = "async-context"; 3299 alias SOUP_SOCKET_ASYNC_CONTEXT = SOCKET_ASYNC_CONTEXT; 3300 3301 /** 3302 * Alias for the #SoupSocket:non-blocking property. (Whether 3303 * or not the socket uses non-blocking I/O.) 3304 */ 3305 enum SOCKET_FLAG_NONBLOCKING = "non-blocking"; 3306 alias SOUP_SOCKET_FLAG_NONBLOCKING = SOCKET_FLAG_NONBLOCKING; 3307 3308 /** 3309 * Alias for the #SoupSocket:is-server property, qv. 3310 */ 3311 enum SOCKET_IS_SERVER = "is-server"; 3312 alias SOUP_SOCKET_IS_SERVER = SOCKET_IS_SERVER; 3313 3314 /** 3315 * Alias for the #SoupSocket:local-address property. (Address 3316 * of local end of socket.) 3317 */ 3318 enum SOCKET_LOCAL_ADDRESS = "local-address"; 3319 alias SOUP_SOCKET_LOCAL_ADDRESS = SOCKET_LOCAL_ADDRESS; 3320 3321 /** 3322 * Alias for the #SoupSocket:remote-address property. (Address 3323 * of remote end of socket.) 3324 */ 3325 enum SOCKET_REMOTE_ADDRESS = "remote-address"; 3326 alias SOUP_SOCKET_REMOTE_ADDRESS = SOCKET_REMOTE_ADDRESS; 3327 3328 /** 3329 * Alias for the #SoupSocket:ssl-creds property. 3330 * (SSL credential information.) 3331 */ 3332 enum SOCKET_SSL_CREDENTIALS = "ssl-creds"; 3333 alias SOUP_SOCKET_SSL_CREDENTIALS = SOCKET_SSL_CREDENTIALS; 3334 3335 /** 3336 * Alias for the #SoupSocket:ssl-fallback property. 3337 */ 3338 enum SOCKET_SSL_FALLBACK = "ssl-fallback"; 3339 alias SOUP_SOCKET_SSL_FALLBACK = SOCKET_SSL_FALLBACK; 3340 3341 /** 3342 * Alias for the #SoupSocket:ssl-strict property. 3343 */ 3344 enum SOCKET_SSL_STRICT = "ssl-strict"; 3345 alias SOUP_SOCKET_SSL_STRICT = SOCKET_SSL_STRICT; 3346 3347 /** 3348 * Alias for the #SoupSocket:timeout property. (The timeout 3349 * in seconds for blocking socket I/O operations.) 3350 */ 3351 enum SOCKET_TIMEOUT = "timeout"; 3352 alias SOUP_SOCKET_TIMEOUT = SOCKET_TIMEOUT; 3353 3354 /** 3355 * Alias for the #SoupSocket:tls-certificate 3356 * property. Note that this property's value is only useful 3357 * if the socket is for a TLS connection, and only reliable 3358 * after some data has been transferred to or from it. 3359 */ 3360 enum SOCKET_TLS_CERTIFICATE = "tls-certificate"; 3361 alias SOUP_SOCKET_TLS_CERTIFICATE = SOCKET_TLS_CERTIFICATE; 3362 3363 /** 3364 * Alias for the #SoupSocket:tls-errors 3365 * property. Note that this property's value is only useful 3366 * if the socket is for a TLS connection, and only reliable 3367 * after some data has been transferred to or from it. 3368 */ 3369 enum SOCKET_TLS_ERRORS = "tls-errors"; 3370 alias SOUP_SOCKET_TLS_ERRORS = SOCKET_TLS_ERRORS; 3371 3372 /** 3373 * Alias for the #SoupSocket:trusted-certificate 3374 * property. 3375 */ 3376 enum SOCKET_TRUSTED_CERTIFICATE = "trusted-certificate"; 3377 alias SOUP_SOCKET_TRUSTED_CERTIFICATE = SOCKET_TRUSTED_CERTIFICATE; 3378 3379 /** 3380 * Alias for the #SoupSocket:use-thread-context property. (Use 3381 * g_main_context_get_thread_default()) 3382 */ 3383 enum SOCKET_USE_THREAD_CONTEXT = "use-thread-context"; 3384 alias SOUP_SOCKET_USE_THREAD_CONTEXT = SOCKET_USE_THREAD_CONTEXT; 3385 3386 /** 3387 * A macro that should be defined by the user prior to including 3388 * libsoup.h. The definition should be one of the predefined libsoup 3389 * version macros: %SOUP_VERSION_2_24, %SOUP_VERSION_2_26, ... 3390 * 3391 * This macro defines the earliest version of libsoup that the package 3392 * is required to be able to compile against. 3393 * 3394 * If the compiler is configured to warn about the use of deprecated 3395 * functions, then using functions that were deprecated in version 3396 * %SOUP_VERSION_MIN_REQUIRED or earlier will cause warnings (but 3397 * using functions deprecated in later releases will not). 3398 */ 3399 enum VERSION_MIN_REQUIRED = 2; 3400 alias SOUP_VERSION_MIN_REQUIRED = VERSION_MIN_REQUIRED;